What am I doing wrong. This is my automation:
- alias: "Turn on/off light"
id: "Turn on/off light"
trigger:
- platform: event
event_type: rhasspy_HassTurnOnOff
action:
- service: "switch.turn_{{state_attr(trigger.event.data, 'status')}}"
data_template:
message: "{{trigger.event.data.name}}"
I tried both methods I have seen used in the forums and both give me the same error below.
I am getting the following error in the automations trace:
Error: Error rendering data template: UndefinedError: ‘dict objet’ has no attribute ‘event’
Any help would be appreciated.