I add sensor from Danfoss thermostat battery level:
- platform: template
sensors:
battery_thermostat_antresola:
friendly_name: Thermostat Antresola
value_template: '{{ states.climate.antresola_thermostat_heating_1_2_1.attributes.battery_level }}'
unit_of_measurement: '%'
and in log there is that error:
17-01-08 16:38:45 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'attributes'
What I’m doing wrong?