Open Drealine opened 10 months ago
Magnet "presence" is binary_sensor
https://github.com/petrleocompel/hikaxpro_hacs/blob/61aa83c1264b1d11811189bebec70d180db4d1f9/custom_components/hikvision_axpro/sensor.py#L172 https://github.com/petrleocompel/hikaxpro_hacs/blob/61aa83c1264b1d11811189bebec70d180db4d1f9/custom_components/hikvision_axpro/sensor.py#L228 https://github.com/petrleocompel/hikaxpro_hacs/blob/61aa83c1264b1d11811189bebec70d180db4d1f9/custom_components/hikvision_axpro/sensor.py#L282 https://github.com/petrleocompel/hikaxpro_hacs/blob/61aa83c1264b1d11811189bebec70d180db4d1f9/custom_components/hikvision_axpro/sensor.py#L349 https://github.com/petrleocompel/hikaxpro_hacs/blob/61aa83c1264b1d11811189bebec70d180db4d1f9/custom_components/hikvision_axpro/sensor.py#L416
All of them are BinarySensorEntity
It's strange. All sensors of MagnetShockDetector are sensor.* and not binary_sensor.. See bellow :
I feel like you mixing up dev terminology and ui terminology
Yes you've reason. So the FR is for UI.
Okay UI see now what you mean. Refactor will be to change move those from sensor.py
to binary_sensor.py
and initialize them as binary sensors
. Sadly not too easy you can expect such a thing in next release 2.2.0
Hi It's me again. Did you think it can be more usual to have magnet open detection as binary_sensor and not as sensor in HA ? Thank you