Add PollControl cluster support to ZHA (#32618)
* Poll control channel Set check-in interval to 55min. Set long-poll interval to 6s. * Update tests. * Don't use magic numbers.
This commit is contained in:
1 parent
9a3c58213b
commit
87b770be08
3 files changed
+133
-4
No files matched your search
@@ -127,13 +127,15 @@ async def async_enable_traffic(hass, zha_devices):
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
def make_zcl_header(command_id: int, global_command: bool = True) -> zcl_f.ZCLHeader:
|
||||
def make_zcl_header(
|
||||
command_id: int, global_command: bool = True, tsn: int = 1
|
||||
) -> zcl_f.ZCLHeader:
|
||||
"""Cluster.handle_message() ZCL Header helper."""
|
||||
if global_command:
|
||||
frc = zcl_f.FrameControl(zcl_f.FrameType.GLOBAL_COMMAND)
|
||||
else:
|
||||
frc = zcl_f.FrameControl(zcl_f.FrameType.CLUSTER_COMMAND)
|
||||
return zcl_f.ZCLHeader(frc, tsn=1, command_id=command_id)
|
||||
return zcl_f.ZCLHeader(frc, tsn=tsn, command_id=command_id)
|
||||
|
||||
|
||||
def reset_clusters(clusters):
|
||||
|
||||
Reference in new issue
Block a user