I’ve configured the Google calendar integration and my automation works when I use just a trigger on a calendar event, however, when I add a condition to use the calendar event title the automation fails to work.
My automation is
- id: '1591669555874'
alias: Test Calendar Automation
description: ''
trigger:
- entity_id: calendar.automation
from: 'off'
platform: state
to: 'on'
condition:
- condition: template
value_template: '"{{state_attr(''calendar.automation'', ''message'', ''Test'')
}}"'
action:
- data: {}
entity_id: switch.47272787a4cf12b50632_4
service: switch.turn_on
The state attributes show calendar.automation is correct and the event message is Test
My original automation had
value_template: "{{is_state_attr('calendar.automation', 'message', 'Test') }}"
as per the HA Integration page but that didn’t work either. Does anyone have any ideas what’s wrong with my code?