rorr73 / LifeSOSpy_MQTT

MQTT Client to communicate with LifeSOS alarm systems.
MIT License
5 stars 2 forks source link

Feature request: Device battery binary sensor for HA #9

Closed bratanon closed 5 years ago

bratanon commented 5 years ago

It would be nice to have a binary sensor that shows the device battery status in Home Assistant.

We could make use of the BatteryLow and PowerOnReset event codes and present a low battery binary sensor that listen to the [device_id]/event_code topic.

The fact the the events are not retained doesnt matter as Home Assistant will keep track of the status for us in case of a connection lost/restart situation.

rorr73 commented 5 years ago

Thanks for this addition :thumbsup: It has been deployed in 0.11.4

papou-github commented 2 years ago

Hi, First of all, thanks for this add on, it work like a charm !

I just have an issue with the battery sensor: Is having a battery state "unknown" is normal ?

Here is an extract of my config.yaml

The state for binary_sensor.garage_motion_battery is "unknown" . And all my LS30 devices have the state issue (smoke sensors & motion sensors) Thanks for your help.

bratanon commented 2 years ago

@papou-github Since HA 2022.2.X its the case.