[Solved] Sensor template confusion

Hi,

Previously I had the following template sensor configured for warning me if inside is warmer than outside and inside is above 25 degrees:

in_hotter_than_out_temp:
value_template: ‘{{ states( “sensor.netatmo_huiskamer_temperature” )|float > states( “sensor.netatmo_buiten_temperature” )|float and states(“sensor.netatmo_huiskamer_temperature”)|float > 25 }}’

But with the .81 update of HASS it comes up with the following error:

[homeassistant.components.sensor.template] Template sensor in_hotter_than_out_temp has no entity ids configured to track nor were we able to extract the entities to track from the icon template(s). This entity will only be able to be updated manually.

I tried working around the template sensors, but can’t get it to work…

When trying

’ {{states.sensor.netatmo_huiskamer.attributes}}’

The result given is:

’ {‘unit_of_measurement’: ‘°C’, ‘device_class’: ‘temperature’, ‘friendly_name’: ‘Netatmo Huiskamer Temperature’}’

When trying

’ {{states.sensor.netatmo_huiskamer_temperature}}’

This is the result:

’ <template state sensor.netatmo_huiskamer_temperature=18.4; unit_of_measurement=°C, device_class=temperature, friendly_name=Netatmo Huiskamer Temperature @ 2018-10-28T09:47:37.476857+01:00>’

What will be the syntax now to get the sensor automatically updated??

You must use ‘entity_id:’ now to tell HA what entity_id to check:

in_hotter_than_out_temp:
  entity_id:
    - sensor.netatmo_huiskamer_temperature
    - sensor.netatmo_buiten_temperature
  value_template: ‘{{ states(“sensor.netatmo_huiskamer_temperature”)|float > states(“sensor.netatmo_buiten_temperature”)|float and states (“sensor.netatmo_huiskamer_temperature”)|float > 25 }}
4 Likes

THANX!!!

It was even more simple than I expected!!