Hello all,
Can someone help me figure out how the error is getting created on the below automation. I will post first the automation and then second the error showing in my logs.
Is this an instance, when I can’t run it manually to test it? And if so, would someone explain that concept for me because I don’t really understand it.
- id: dog_mode_activated
alias: Dog Mode Activated
mode: single
trigger:
- platform: state
entity_id: binary_sensor.gym_motion_sensor
to: "on"
- platform: state
entity_id: input_boolean.dog_mode
to: "on"
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.friendly_name == "Dog Mode" }}'
sequence:
- service: script.text_notify
data:
who: "parents"
message: "Dog Mode has been enabled manually"
- conditions:
- condition: state
entity_id: input_boolean.sentry_mode
state: "on"
- condition: state
entity_id: group.family
state: "home"
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.dog_mode
- service: script.jarvis_alert
data_template:
# who: kitchen
message: "Turning on Dog Mode."
- conditions:
- condition: state
entity_id: input_boolean.sentry_mode
state: "on"
- condition: state
entity_id: group.family
state: "not_home"
- condition: state
entity_id: input_boolean.vacation_mode
state: "off"
sequence:
- service: script.text_alert
data:
who: parents
message: "Wrigley may be trying to go out and no one appears to be here to let him out."
- service: script.dog_mode_lighting_on
data: {}
- delay:
minutes: 20
- service: input_boolean.turn_off
entity_id: input_boolean.dog_mode
Logger: homeassistant.helpers.template
Source: helpers/template.py:1862
First occurred: 12:50:28 AM (1 occurrences)
Last logged: 12:50:28 AM
Template variable error: 'dict object' has no attribute 'to_state' when rendering '{{ trigger.to_state.attributes.friendly_name == "Dog Mode" }}'