Hello,
Is it possible to get the status of the battery on Home-Assistant ?
Because with Jeedom, it was a basic function that was included!
Thanks in advance for your help !
If you there is an attribute present on your entity, than it should work with
- platform: template
sensors:
battery_level_door_sensor_525: #just an entity id you can define for your battery
friendly_name: 'Batterij Level Sensor Deur Voor'
value_template: '{{ states.<your entity ID>.attributes.battery_level }}'
unit_of_measurement: '%'
Thank you very much for your help, it works!
Cordially.
Hello,
Sorry to bother you, but I think I have a bug with the code to get the status of the battery!
Since yesterday, I still have the same value “55”, and especially I noticed the following error message in the log:
Error message, in components/template/sensor.py :
=> Could not render template FGSD002 : Battery State, the state is unknown.
Thanks in advance for your help.
Here is my code for the status of the battery:
sensor:
- platform: template
sensors:
battery_level_smoke_sensor_1:
friendly_name: 'FGSD002 : Battery Status'
value_template: '{{ states.zwave.fibaro_system_fgsd002_smoke_sensor.attributes.battery_level }}'
unit_of_measurement: '%'
Note :
The “entity ID” of the “Fibaro Smoke Sensor” is : zwave.fibaro_system_fgsd002_smoke_sensor