Skip to content

Commit

Permalink
NEW: Expose detection parameters for SNZB-03P
Browse files Browse the repository at this point in the history
This older(?) PIR occupancy device has some of the same parameters
as the newer SNZB-06P. You can manually set them through the zigbee
device management menu, but it would be nicer if there was a button in the
main UI. The 03P model is a PIR sensor, but it still uses the ultrasonic
tagged parameters to control the device. The PIR parameters all have a
value of None.
  • Loading branch information
carterbox committed Sep 27, 2024
1 parent 62ec158 commit 83c4046
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zha/application/platforms/number/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ class SonoffThermostatLocalTempCalibration(ThermostatLocalTempCalibration):


@CONFIG_DIAGNOSTIC_MATCH(
cluster_handler_names=CLUSTER_HANDLER_OCCUPANCY, models={"SNZB-06P"}
cluster_handler_names=CLUSTER_HANDLER_OCCUPANCY, models={"SNZB-06P", "SNZB-03P"}
)
class SonoffPresenceSenorTimeout(NumberConfigurationEntity):
"""Configuration of Sonoff sensor presence detection timeout."""
Expand Down
2 changes: 1 addition & 1 deletion zha/application/platforms/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ class SonoffPresenceDetectionSensitivityEnum(types.enum8):


@CONFIG_DIAGNOSTIC_MATCH(
cluster_handler_names=CLUSTER_HANDLER_OCCUPANCY, models={"SNZB-06P"}
cluster_handler_names=CLUSTER_HANDLER_OCCUPANCY, models={"SNZB-06P", "SNZB-03P"}
)
class SonoffPresenceDetectionSensitivity(ZCLEnumSelectEntity):
"""Entity to set the detection sensitivity of the Sonoff SNZB-06P."""
Expand Down
2 changes: 1 addition & 1 deletion zha/zigbee/cluster_handlers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def is_sonoff_presence_sensor(cluster_handler: ClusterHandler) -> bool:
"""Return true if the manufacturer and model match known Sonoff sensor models."""
return cluster_handler.cluster.endpoint.manufacturer in (
"SONOFF",
) and cluster_handler.cluster.endpoint.model in ("SNZB-06P",)
) and cluster_handler.cluster.endpoint.model in ("SNZB-06P", "SNZB-03P")

0 comments on commit 83c4046

Please sign in to comment.