Describe the bug
Area presence binary sensors include binary sensors without device classes in their calculation.
To Reproduce
Steps to reproduce the behavior:
Create a template binary sensor in an area. Give it no device class.
Reload magic areas. Open the details modal for the area binary sensor for the area, and open the attributes pane. Observe that the template binary sensor added is included in the "Presence sensor" attribute
Expected behavior
Expect binary sensors not to be included unless they have a device class included in the area config.
Describe the bug Area presence binary sensors include binary sensors without device classes in their calculation.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expect binary sensors not to be included unless they have a device class included in the area config.
Additional context Issue seems to be in this conditional.
If
ATTR_DEVICE_CLASS in entity.keys()
is False, then the conditional evaluates to False, and the sensor is appended toAreaPresenceBinarySensor
.