Template : no entity_id?

well aware of the new template entity_id necessity I am a bit surprised this error is thrown:

2018-11-04 22:41:15 WARNING (MainThread) [homeassistant.components.sensor.template] Template sensor calculated_bruto_verbruik has no entity ids configured to track nor were we able to extract the entities to track from the friendly_name template(s). This entity will only be able to be updated manually.

for this template:

calculated_bruto_verbruik:
  friendly_name_template: Bruto verbruik
  unit_of_measurement: 'Watt'
  value_template: >
    {{ (states('sensor.zp_actuele_opbrengst')|int)
     + (states('sensor.netto_verbruik')|int) }}

both sensor.netto_verbruik and sensor.zp_actuele_opbrengst’ update constantly (well the sensor.zp doesn’t in the evening, since it is my solar panel sensor…), so I would have thought that to be enough for the sensor to recalculate?

— edit----
nevermind… its in the friendly_name_template…

I am having problems as well. It was working and suddenly I get an error for it.
This is my template sensor:

- platform: template
  sensors:
    current_date_time:
      friendly_name: "Date and Time"
      value_template: "{{ now().strftime('%Y-%m-%d | %H:%M:%S') }}"

I get this error:

Template sensor current_date_time has no entity ids configured to track nor were we able to extract the entities to track from the value template(s). This entity will only be able to be updated manually.

sensor.current_date_time is excluded from the recorder.

now() is not an entity_id HA can check to evaluate the template, you need to add sensor.time or time__date:

sensors:
    current_date_time:
      friendly_name: "Date and Time"
      entity_id: sensor.time__date
      value_template: >
        {{ now().strftime('%Y-%m-%d | %H:%M:%S') }}

of course you need the sensor in the first place, so please be sure to check that too: https://www.home-assistant.io/components/sensor.time_date/

2 Likes