I get the error message in my log but I do not have any entity_id in my sensor section
Paste the error.
Logger: homeassistant.components.template.binary_sensor
Source: helpers/config_validation.py:752
Integration: template (documentation, issues)
First occurred: 6:05:08 PM (3 occurrences)
Last logged: 6:05:08 PM
The ‘entity_id’ option is deprecated, please remove it from your configuration
seems like you missed a template
I don’t know where to look then…
in configuration.yaml I have:
sensor: !include sensors.yaml
In sensors.yaml I do not have the word “entity” or “entity_id”…
searched via the hass file editor addon and via samba notepad++…
(also not finding entity or entity_id in configuration.yaml)
Do you use packages?
You should be looking in your binary_sensor section, not sensors.
yes I use packages…
Oh and I really like this package…
sensor:
# Sensor to track available updates for supervisor & addons
- platform: command_line
name: Supervisor updates
command: 'curl http://supervisor/supervisor/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version,"addons":[.data.addons[] | select(.version != .installed)]}'''
value_template: "{{ value_json.addons | length }}"
json_attributes:
- newest_version
- current_version
- addons
binary_sensor:
- platform: template
sensors:
# True if there's an update available for supervisor
updater_supervisor:
friendly_name: 'Updater - Supervisor'
device_class: problem
entity_id:
- sensor.supervisor_updates
value_template: "{{ state_attr('sensor.supervisor_updates', 'current_version') != state_attr('sensor.supervisor_updates', 'newest_version') }}"
availability_template: "{{ (states('sensor.supervisor_updates') | int(-1)) > -1 }}"
# True if there's updates available for any HACS components
updater_hacs:
friendly_name: 'Updater - HACS'
device_class: problem
entity_id:
- sensor.hacs
value_template: "{{ states('sensor.hacs') | int > 0 }}"
# True if there's updates available for any addons
updater_addons:
friendly_name: 'Updater - Addons'
device_class: problem
entity_id:
- sensor.supervisor_updates
value_template: "{{ states('sensor.supervisor_updates') | int > 0 }}"
alert:
# Update is available - un-acknowledgeble, auto-dismiss, me only
# Wait 5 minutes before first to give core config check time to run
ha_update_available:
name: HA has an update
entity_id: binary_sensor.updater
state: 'on'
can_acknowledge: false
repeat:
- 5
- 360
skip_first: true
title: 'Update for HA available'
message: "New version is {{ state_attr('binary_sensor.updater', 'newest_version') }}. Currently on {{ states('sensor.current_version') }}"
notifiers:
- 'me'
data:
tag: 'ha-update-available'
url: 'http://hassio.local/hassio/addon/core_check_config'
ttl: 21600
# Supervisor update is available - un-acknowledgeable, auto-dismiss, me only
supervisor_update_available:
name: Supervisor has an update
entity_id: binary_sensor.updater_supervisor
state: 'on'
can_acknowledge: false
repeat: 360
title: 'Update for HA Supervisor available'
message: "New version is {{ state_attr('sensor.supervisor_updates', 'newest_version') }}. Currently on {{ state_attr('sensor.supervisor_updates', 'current_version') }}"
notifiers:
- 'me'
data:
tag: 'supervisor-update-available'
url: 'http://hassio.local/hassio/dashboard'
ttl: 21600
# HACS repos have updates available - unacknowledgeable, auto-dismiss, me only
hacs_update_available:
name: HACS repos have updates
entity_id: binary_sensor.updater_hacs
state: 'on'
can_acknowledge: false
repeat: 360
title: "Updates available in {{ states('sensor.hacs') }} HACS repo{% if states('sensor.hacs') | int > 1 %}s{% endif %}"
message: ""
notifiers:
- 'me'
data:
tag: 'hacs-update-available'
url: 'http://hassio.local/hacs/installed'
ttl: 21600
# Addons have updates available - unacknowledgeable, auto-dismiss, me only
addon_update_available:
name: Addons have updates
entity_id: binary_sensor.updater_addons
state: 'on'
can_acknowledge: false
repeat: 360
title: "Updates available for {{ states('sensor.supervisor_updates') }} HA addon{% if states('sensor.supervisor_updates') | int > 1 %}s{% endif %}"
message: ""
notifiers:
- 'me'
data:
tag: 'addon-update-available'
url: 'http://hassio.local/hassio/dashboard'
ttl: 21600
automation:
- id: '1585256741683'
alias: Check config with update
description: Starts the check config addon when an update becomes available
trigger:
- entity_id: binary_sensor.updater
platform: state
to: 'on'
condition: []
action:
- data:
addon: core_check_config
service: hassio.addon_start
So now that you’ve removed the entity_id key from the binary sensors, is it fixed?
No, I have not created that package and I do not know if I can “just” delete the entity_id lines without breaking anything…?
Every one I circled can be safely deleted without impacting the template.
This whole thread is about the fact that you have to remove those keys from your templates
mf_social, yes, if you fully understand what you are doing, it is cool to do so or to response to me like this . But for me it is more like this:
I do not know it it safe or if I break things…
E.g. this one:
binary_sensor:
- platform: template
sensors:
# True if there's an update available for supervisor
updater_supervisor:
friendly_name: 'Updater - Supervisor'
device_class: problem
entity_id:
- sensor.supervisor_updates
value_template: "{{ state_attr('sensor.supervisor_updates', 'current_version') != state_attr('sensor.supervisor_updates', 'newest_version') }}"
availability_template: "{{ (states('sensor.supervisor_updates') | int(-1)) > -1 }}"
If I do this:
binary_sensor:
- platform: template
sensors:
# True if there's an update available for supervisor
updater_supervisor:
friendly_name: 'Updater - Supervisor'
device_class: problem
# entity_id:
# - sensor.supervisor_updates
value_template: "{{ state_attr('sensor.supervisor_updates', 'current_version') != state_attr('sensor.supervisor_updates', 'newest_version') }}"
availability_template: "{{ (states('sensor.supervisor_updates') | int(-1)) > -1 }}"
will there still be as sensor named sensor.supervisor_updates
or will it become like sensor.updater_supervisor (derived from
sensors:
# True if there's an update available for supervisor
updater_supervisor:
?
That’s not what the entity_id key did in the first place
I don’t think I can help you much more than telling you that you have to delete those keys and that when you do so there will be no difference to how your system was working before, except that the warning messages in the log will go away.
Eh ?
The sensor entity is “binary_sensor.updater_supervisor”
Its Friendly name is “Updater - Supervisor”
Two different things and both will remain.
Ok, I blindly hashed out the 3 sensors and the error is gone… hope it will continue working as before
You #Hashed Out# the 3 sensors ???
Or just the entity_id: lines as Petro/Marc instructed ?
only this 3 times:
# entity_id:
# - sensor.supervisor_updates
# entity_id:
# - sensor.hacs
# entity_id:
# - sensor.supervisor_updates
Okay, that’s fine.
Leave it a couple of weeks, if you are nervous, then just delete the lines
entity_id (in template sensors (both binary and otherwise)) have been ‘deprecated’ i.e. they aren’t supported anymore. They used to tell the sensor what to monitor for changes so the sensor could be updated. They have implemented a new method that examines the template, determines which states affect that sensor and monitors those without you having to specify.
This is ALL covered in the update notes and what numerous threads running on the forum are talking about,
If you update blindly you will run into issues like this, please read the update notes.
Second point : - This is CaptTom’s thread, he will get notified when anyone else posts to this thread.
NO-ONE ELSE WILL
I just happened to see that you had posted again on this thread.
For Petro , Marc Or me to know that you have ‘done something’ in response to a requested action, you need to either ‘Reply To’ that person, ‘Tag’ That person OR ‘Quote’ that person.
‘Reply’ ing to the thread just lets CaptTom know
The “Reply To” is the ‘Reply button’ in the bottom right of that person’s post