Hi All,
I have connected my Sonoff zigbee bridege to my home assitant using this component: https://github.com/AlexxIT/SonoffLAN
I add on the ewlink app one door sensor, and all looks working ok.
Also diging in the properties of the new sensor I found this on the development page:
So i want to create a sensor/template that shows the battery level of this.
I have try the templates with no results, my last attempt is this one:
sensor 17:
- platform: template
sensors:
bat5:
friendly_name: "bat_5"
unit_of_measurement: '%'
value_template: '{{ states.sensor.binary_sensor.sonoff_a4400008d0.attributes.battery_level }}'
icon_template: mdi:battery
I have change the following line in 2 different ways:
value_template: '{{ states.sensor.binary_sensor.sonoff_a4400008d0.attributes.battery_level }}'
value_template: '{{ states.sensor.binary_sensor.sonoff_a4400008d0.attributes.battery }}'
And i got this after restarting HA with any of the two previews options:
I haven’t try any templates before, I have that code pasted in my config.yaml file.
If more information is needed let me know.
I just want a sensor that shows the battery level of this component.
I have my HA running in a virtual machine on proxmox from the official image.