Hello, I’m new to home assistant and I’d like to use google calendar event in automation, but it doesn’t work. I added google calendar to home assistant, but my automation doesn’t work. I have a calendar named “bojler” and there 2 events on the calendar (not on the same day). One of the events called “Fürdés” and the other “Hajmosás”. (Fürdés event start at 06:00 and ends at 08:40), and (Hajmosás start at 06:00 and ends at 09:40).
So basically I’d like to automate that when Fürdés event starts (at 06:00) based on calendar.bojler then turn on bojler(smart plug) and turn off after 2 hour 40 minutes.
The other “Hajmosás” is the same only difference it turns off after 3 hour 40 minutes.
I created 2 automation based on: https://www.home-assistant.io/integrations/calendar.google/
and it should activate Hajmosás because it’s in the calendar today, but it didn’t turned on bojler.
Can someone help, what could be the problem?
Fürdés automation:
- id: '1603527524327'
alias: Fürdés
description: Fürdéshez bekapcsolja a bojlert
trigger:
- platform: state
entity_id: calendar.bojler
to: ‘on’
condition:
- condition: template
value_template: ‘"{{is_state_attr(’‘calendar.bojler’’, ‘‘message’’, ‘‘Fürdés’’)
}}"’
action:
- type: turn_on
device_id: 3ead97ef12eb11eb92ddf31d451c055e
entity_id: switch.80820452bcddc226a269
domain: switch
- delay: 02:40:00
- type: turn_off
device_id: 3ead97ef12eb11eb92ddf31d451c055e
entity_id: switch.80820452bcddc226a269
domain: switch
mode: single
Hajmosás automation
- id: '1603527704795'
alias: Hajmosás
description: Hajmosáshoz bekapcsolja a bojlert
trigger:
- platform: state
entity_id: calendar.bojler
to: ‘on’
condition:
- condition: template
value_template: ‘"{{is_state_attr(’‘calendar.bojler’’, ‘‘message’’, ‘‘Hajmosás’’)
}}"’
action:
- type: turn_on
device_id: 3ead97ef12eb11eb92ddf31d451c055e
entity_id: switch.80820452bcddc226a269
domain: switch
- delay: 03:40:00
- type: turn_off
device_id: 3ead97ef12eb11eb92ddf31d451c055e
entity_id: switch.80820452bcddc226a269
domain: switch
mode: single!