@rednas wrote:
Currently I have this automation:
- alias: 'Device State Change Alert' trigger: platform: state entity_id: person.P1, person.P2 condition: condition: template value_template: '{{ trigger.to_state.state != trigger.from_state.state }}' action: - service: notify.notify data_template: message: > {{ trigger.to_state.attributes.friendly_name }} is at {{ trigger.to_state.state }}. title: ""
How can I change
trigger.to_state.state
to a value where it returns the friendly name? Currently it returns the correct name for custom zones, however for the home zone it returns “home” and when not at home it return “not_home”. I would like to have the friendly names returned instead of “home” and “not_home”.
How can I change this?
It’s nottrigger.to_state.attributes.friendly_name
as this returns the name of the person, which is quite strange I would say.
Posts: 2
Participants: 2