It turns out that other specialized subclasses (Motion, Occupancy, sensor.Sensor) all rely on this behavior, and maybe only selectively (there may be cases where a Motion or Occupancy or sensor.Sensor does not have type=Occupancy).
I've requested some more sample sensor data in home-assistant/core#121300 so hopefully we can use that to expand the sensor coverage and thus make it safe to do a refactor again.
In #29, we learned that the special handling of
type=Occupancy
in theBinarySensor
cannot be readily moved to the relevant subclass:https://github.com/jaraco/jaraco.abode/blob/abb2c6a0028ac04cee3ca2c40bfb8186b972f9a3/jaraco/abode/devices/binary_sensor.py#L17-L18
It turns out that other specialized subclasses (Motion, Occupancy, sensor.Sensor) all rely on this behavior, and maybe only selectively (there may be cases where a Motion or Occupancy or sensor.Sensor does not have
type=Occupancy
).I've requested some more sample sensor data in home-assistant/core#121300 so hopefully we can use that to expand the sensor coverage and thus make it safe to do a refactor again.