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 ,
@@ -399,7 +401,7 @@ class Command(Struct):
399401 "status" : Status ,
400402 "frame_length" : t .uint16_t ,
401403 "payload_length" : t .uint16_t ,
402- "reserved " : t . LongOctetString ,
404+ "gp_data_frame " : GPDataFrame
403405 },
404406 ),
405407}
@@ -690,6 +692,18 @@ async def _data_poller(self):
690692 status = rsp ["status" ], device_state = rsp ["device_state" ]
691693 )
692694
695+ def _handle_zigbee_green_power (
696+ self ,
697+ status : Status ,
698+ gp_data_frame : GPDataFrame
699+ ) -> None :
700+ if status == Status .SUCCESS :
701+ asyncio .ensure_future (
702+ self ._app ._greenpower .handle_received_green_power_frame (gp_data_frame ),
703+ loop = asyncio .get_running_loop ()
704+ )
705+
706+
693707 def _handle_device_state_changed (
694708 self ,
695709 status : t .Status ,
You can’t perform that action at this time.
0 commit comments