Skip to content

Commit

Permalink
Use 'occupancy' device_class instead of 'motion' for occupancy sensors
Browse files Browse the repository at this point in the history
'occupancy' matches the zigbee terminology more closely and is more
consistent with other Home Assistant entities of this type.

https://www.home-assistant.io/integrations/binary_sensor/

In general, it looks like 'motion' is more for alarms, and 'occupancy'
for non-alarm situations. Z2M currently makes no distinction between
these concepts, but they could be separated (with a fair amount of work).
  • Loading branch information
agoode committed Jun 2, 2024
1 parent 8b4f753 commit ec0bd7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ export default class HomeAssistant extends Extension {
moving: {device_class: 'moving'},
no_position_support: {entity_category: 'config', icon: 'mdi:minus-circle-outline'},
noise_detected: {device_class: 'sound'},
occupancy: {device_class: 'motion'},
occupancy: {device_class: 'occupancy'},
power_outage_memory: {entity_category: 'config', icon: 'mdi:memory'},
presence: {device_class: 'presence'},
setup: {device_class: 'running'},
Expand Down

0 comments on commit ec0bd7f

Please sign in to comment.