File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1414 from asyncio import timeout as asyncio_timeout # pragma: no cover
1515
1616from zigpy .config import CONF_DEVICE_PATH
17+ import zigpy .greenpower
1718from zigpy .types import (
1819 APSStatus ,
1920 Bool ,
2021 Channels ,
22+ GPDataFrame ,
2123 KeyData ,
2224 SerializableBytes ,
2325 Struct ,
@@ -398,7 +400,7 @@ class Command(Struct):
398400 "status" : Status ,
399401 "frame_length" : t .uint16_t ,
400402 "payload_length" : t .uint16_t ,
401- "reserved " : t . LongOctetString ,
403+ "gp_data_frame " : GPDataFrame
402404 },
403405 ),
404406}
@@ -689,6 +691,18 @@ async def _data_poller(self):
689691 status = rsp ["status" ], device_state = rsp ["device_state" ]
690692 )
691693
694+ def _handle_zigbee_green_power (
695+ self ,
696+ status : Status ,
697+ gp_data_frame : GPDataFrame
698+ ) -> None :
699+ if status == Status .SUCCESS :
700+ asyncio .ensure_future (
701+ self ._app ._greenpower .handle_received_green_power_frame (gp_data_frame ),
702+ loop = asyncio .get_running_loop ()
703+ )
704+
705+
692706 def _handle_device_state_changed (
693707 self ,
694708 status : t .Status ,
You can’t perform that action at this time.
0 commit comments