diff --git a/zha/zigbee/cluster_handlers/const.py b/zha/zigbee/cluster_handlers/const.py index 74ed57088..6c6e746b8 100644 --- a/zha/zigbee/cluster_handlers/const.py +++ b/zha/zigbee/cluster_handlers/const.py @@ -81,6 +81,7 @@ IKEA_REMOTE_CLUSTER: Final[int] = 0xFC80 INOVELLI_CLUSTER: Final[int] = 0xFC31 OSRAM_BUTTON_CLUSTER: Final[int] = 0xFD00 +PHILIPS_CONTACT_CLUSTER: Final[int] = 0xFC06 PHILLIPS_REMOTE_CLUSTER: Final[int] = 0xFC00 SMARTTHINGS_ACCELERATION_CLUSTER: Final[int] = 0xFC02 SMARTTHINGS_HUMIDITY_CLUSTER: Final[int] = 0xFC45 diff --git a/zha/zigbee/cluster_handlers/manufacturerspecific.py b/zha/zigbee/cluster_handlers/manufacturerspecific.py index da6eb4be0..f9c54ea13 100644 --- a/zha/zigbee/cluster_handlers/manufacturerspecific.py +++ b/zha/zigbee/cluster_handlers/manufacturerspecific.py @@ -31,6 +31,7 @@ IKEA_REMOTE_CLUSTER, INOVELLI_CLUSTER, OSRAM_BUTTON_CLUSTER, + PHILIPS_CONTACT_CLUSTER, PHILLIPS_REMOTE_CLUSTER, REPORT_CONFIG_ASAP, REPORT_CONFIG_DEFAULT, @@ -78,6 +79,17 @@ class OsramButtonClusterHandler(ClusterHandler): REPORT_CONFIG = () +@registries.CLUSTER_HANDLER_ONLY_CLUSTERS.register(PHILIPS_CONTACT_CLUSTER) +@registries.CLUSTER_HANDLER_REGISTRY.register(PHILIPS_CONTACT_CLUSTER) +class PhillipsContactClusterHandler(ClusterHandler): + """Phillips contact cluster handler.""" + + REPORT_CONFIG = ( + AttrReportConfig(attr="contact", config=REPORT_CONFIG_IMMEDIATE), + AttrReportConfig(attr="tamper", config=REPORT_CONFIG_IMMEDIATE), + ) + + @registries.CLUSTER_HANDLER_ONLY_CLUSTERS.register(PHILLIPS_REMOTE_CLUSTER) @registries.CLUSTER_HANDLER_REGISTRY.register(PHILLIPS_REMOTE_CLUSTER) class PhillipsRemoteClusterHandler(ClusterHandler):