Skip to content

Conversation

@jspiros
Copy link
Contributor

@jspiros jspiros commented Aug 20, 2025

This addresses a semantic difference in how the term "presence" is used by Home Assistant. Home Assistant uses the "presence" device_class for binary_sensor entities that track the presence of something mobile or portable. To that end, Home Assistant reports state changes in binary_sensor entities with the "presence" device_class like "binary_sensor was detected at home" or "binary_sensor was detected away".

I have verified that all devices currently supported by zigbee2mqtt that expose a "presence" sensor are human presence sensors (sensors that detect the presence of a person or people in a physical space) which is a more appropriate use case for the "occupancy" device_class in Home Assistant.

State changes in binary_sensor entities with the "occupancy" device_class are reported by Home Assistant like "binary_sensor detected occupancy" or "binary_sensor cleared (no occupancy detected)", which is a much more coherent message for these sensors.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 20, 2025

CodSpeed Performance Report

Merging #28329 will not alter performance

Comparing jspiros:ha-presence-occupancy (e1ad3b1) with dev (23f831a)

Summary

✅ 9 untouched benchmarks

@Koenkk Koenkk merged commit ccfab84 into Koenkk:dev Aug 20, 2025
12 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Aug 20, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants