I have an automation for setting my Wled roof lights based on a google calendar event. This works fine as long as I only have one event - once I have two (example: all month event called December, then a single day event called Christmas Day) I want to get the event data for the single day event, but it only pulls the event info for the all month event.
I tried to follow the info in this posting (Act on one of multiple calendar entries ) however I could not figure out how to adapt my automation to use this. I am hoping someone can help me out. Get templating to work eludes me.
Here is my current automation yaml
alias: Set Wled Preset
description: ""
trigger:
- platform: sun
event: sunset
offset: 0
id: "On"
enabled: true
- platform: time
at: "22:30:00"
id: "Off"
enabled: true
- platform: conversation
command: turn on roof
id: "On"
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: "On"
sequence:
- choose:
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: Canada Day
sequence:
- action: select.select_option
metadata: {}
data:
option: Canada Day
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: New Years Eve
sequence:
- action: select.select_option
metadata: {}
data:
option: New Years Eve
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: Christmas Eve
sequence:
- action: select.select_option
metadata: {}
data:
option: Christmas Eve
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: Christmas Day
sequence:
- action: select.select_option
metadata: {}
data:
option: Christmas Day
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: Thanksgiving Day
sequence:
- action: select.select_option
metadata: {}
data:
option: Thanksgiving Day
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: January
sequence:
- action: select.select_option
metadata: {}
data:
option: January
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: February
sequence:
- action: select.select_option
metadata: {}
data:
option: February
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: March
sequence:
- action: select.select_option
metadata: {}
data:
option: March
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: April
sequence:
- action: select.select_option
metadata: {}
data:
option: April
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: May
sequence:
- action: select.select_option
metadata: {}
data:
option: May
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: June
sequence:
- action: select.select_option
metadata: {}
data:
option: June
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: July
sequence:
- action: select.select_option
metadata: {}
data:
option: July
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: message
state: August
sequence:
- action: select.select_option
metadata: {}
data:
option: August
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: September
sequence:
- action: select.select_option
metadata: {}
data:
option: September
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: October
sequence:
- action: select.select_option
metadata: {}
data:
option: October
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: November
sequence:
- action: select.select_option
metadata: {}
data:
option: November
target:
entity_id: select.wled_preset
- conditions:
- condition: state
entity_id: calendar.wled
attribute: description
state: December
sequence:
- action: select.select_option
metadata: {}
data:
option: December
target:
entity_id: select.wled_preset
- action: light.turn_on
target:
entity_id: light.wled
data: {}
- data:
message: Wled has turned on
title: WLED
enabled: false
action: notify.notify
- data: {}
target:
entity_id: switch.christmas_indoor_lights
action: switch.turn_on
- conditions:
- condition: trigger
id: "Off"
sequence:
- data: {}
target:
device_id: 8827056537b26a7e51609866ff312aba
action: light.turn_off
- data: {}
target:
entity_id: switch.christmas_indoor_lights
action: switch.turn_off
- data:
message: Wled has turned off
title: WLED
enabled: false
action: notify.notify
mode: single