Skip to content

Commit

Permalink
fix: Use occupancy device_class instead of motion for occupancy…
Browse files Browse the repository at this point in the history
… sensors (Koenkk#22896)

'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 authored and ghoz committed Jun 14, 2024
1 parent 877eb10 commit a844530
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 a844530

Please sign in to comment.