When I put the following in the template editor, it gives the correct value: 100
{{ states.zwave.aeotec_dsb45_water_sensor.attributes.battery_level }}
But when I put the following into configuration.yaml
all hell breaks loose…
sensor:
- platform: template
sensors:
- battery_watersensor:
#friendly_name: 'Water Sensor Battery'
value_template: '{{ states.zwave.aeotec_dsb45_water_sensor.attributes.battery_level }}'
unit_of_measurement: '%'
I get the following error:
Invalid config for [sensor.template]: expected a dictionary for dictionary value @ data['sensors']. Got [OrderedDict([('battery_watersensor', OrderedDict([('value_template', '{{ state.zwave.aeotec_dsb45_water_sensor.attributes.battery_level }}'), ('unit_of_measurement', '%')]))])]. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.template/
Any ideas?