File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 14
14
from asyncio import timeout as asyncio_timeout # pragma: no cover
15
15
16
16
from zigpy .config import CONF_DEVICE_PATH
17
+ import zigpy .greenpower
17
18
from zigpy .types import (
18
19
APSStatus ,
19
20
Bool ,
20
21
Channels ,
22
+ GPDataFrame ,
21
23
KeyData ,
22
24
SerializableBytes ,
23
25
Struct ,
@@ -398,7 +400,7 @@ class Command(Struct):
398
400
"status" : Status ,
399
401
"frame_length" : t .uint16_t ,
400
402
"payload_length" : t .uint16_t ,
401
- "reserved " : t . LongOctetString ,
403
+ "gp_data_frame " : GPDataFrame
402
404
},
403
405
),
404
406
}
@@ -689,6 +691,18 @@ async def _data_poller(self):
689
691
status = rsp ["status" ], device_state = rsp ["device_state" ]
690
692
)
691
693
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
+
692
706
def _handle_device_state_changed (
693
707
self ,
694
708
status : t .Status ,
You can’t perform that action at this time.
0 commit comments