mviamin
(Mviamin)
June 9, 2023, 3:43pm
1
I have had this code in config for some time, extracting an attribute into a new sensor entity:
> sensor:
- platform: attributes
friendly_name: "Ecobee Heat"
entities:
- climate.upstairs
attribute: hvac_action
Upon upgrading to 2023.6, it creates an error in the config and does not pass the config check test any longer.
Did i miss a breaking change ?
What is the proper way to extract this attribute into a new sensor entity ?
Thanks in advance !
tom_l
June 9, 2023, 4:01pm
2
There has never been a core attributes sensor platform, are you using a third party integration for this?
Or did you use Chat GPT to generate it?
It looks like Chat GPT gibberish.
Either way, to do it correctly put this in your configuration.yaml file:
template:
- sensor:
- name: Ecobee Heat
state: "{{ state_attr('climate.upstairs', 'hvac_action') }}"
1 Like
mviamin
(Mviamin)
June 9, 2023, 5:29pm
4
@tom_l : figured out where the code came from : custom integration in HACS. The reason for the new error after upgrading to 2023.6 is that the Integration also needed to be updated.
Still, your proposed way is cleaner, thank you.
2 Likes