HI, using this trigger in an automation:
- alias: Dorm Wifi off when Daughters not home
id: 'Dorm Wifi off when Daughters not home'
# initial_state: off
trigger:
platform: state
entity_id: group.daughters
to: 'not_home'
for:
minutes: 15
and this action service:
- service: notify.notify
data_template:
message: >
Dorm Wifi switched Off while
{{trigger.entity_id.attributes.friendly_name}} is {{trigger.to_state.state}}
results in this error:
Error rendering data template: UndefinedError: 'str object' has no attribute 'attributes'
while the group.daughters friendly_name is:
and
{{trigger.to_state.attributes.friendly_name}} is {{trigger.to_state.state}}
worked before.
why does this error out?
reading this doesnt help: https://www.home-assistant.io/docs/automation/templating/#template especially since the state object has the attributes friendly_name: https://www.home-assistant.io/docs/configuration/state_object/