Replies: 4 comments 3 replies
-
I've avoided this as it really depends on the device and some implement entities with a binary sensor with a device class battery where the entity state is true when the battery is ok (so reversing the logic). |
Beta Was this translation helpful? Give feedback.
-
Just for curiosity: I thought you use the device class instead of the name of an entity. So it means if a device has another name as Concerning the logic of the "BinarySensorDeviceClass.BATTERY" the HASS spec defines it: "battery: on means low, off means normal" and I would hope/expect that moste devices used at in this way but I think you have more pracitacal experiences as me, I just have EQ3 homematic components with "BinarySensorDeviceClass.BATTERY" only. |
Beta Was this translation helpful? Give feedback.
-
I do check the device class, sorry I was revisiting old thoughts on how this could have been approached and thought I'd mention why I don't check the entity id to head off that one. That documentation is interesting, I'd never seen it defined as explicitly as that, which means all core integrations at least would abide by it, and hopefully most custom ones, I've seen some bad device classes not related to batteries elsewhere and they are fairly easy to fix if you have a good maintainer. I think I could make that work, if it is used badly the custom template could always override it, I'll investigate. |
Beta Was this translation helpful? Give feedback.
-
I have just pre-released a version 2.8.1 which includes this, along with attributes on the battery_low_plus entity. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have many devices which only have an "BinarySensorDeviceClass.BATTERY" entity.
For such devices the entity "*_battery_plus_low" is not created.
Disadvantage: If I want to filter I need to filter for two entities.
I can change this by adding a template to each battery like:
"{{states('binary_sensor.garagentorpos_low_battery')}}"
I have to do this for every single device, not per device type.
Wouldn't it be possible to this automatic like for the sensor battery ?
Beta Was this translation helpful? Give feedback.
All reactions