I have an automation to run my vacuum with a 3 way condition choose action based on my integrated Google calender.
When my calender says I have a holiday (vakantie) or it is my parttime day of from work (vrij) it runs my vacuum while I'm still sleeping, else it runs delayed while I'm at the office.
The problem I'm having is when my next calender appointment is one of the 2 conditions but not yet today it still runs as if it is the state of the moment.
Is there a good way to add the begin and end time and date of the calender state into the automation condition?
actions:
- choose:
- conditions:
- condition: state
entity_id: calendar....._gmail_com
state: Vakantie
attribute: message
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
device_id: e16126fbe666a8369db986cad5ed1d6a
- delay:
seconds: 10
- device_id: 26b290f5763e72a2c1ec8816561c5901
domain: vacuum
entity_id: 9b236a2cbcdce22ac2f80e9225479d7f
type: clean
- conditions:
- condition: state
entity_id: calendar....._gmail_com
attribute: message
state: Vrij
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
device_id: e16126fbe666a8369db986cad5ed1d6a
- delay:
seconds: 10
- device_id: 26b290f5763e72a2c1ec8816561c5901
domain: vacuum
entity_id: 9b236a2cbcdce22ac2f80e9225479d7f
type: clean
- conditions: []
sequence:
- delay:
hours: 3
- device_id: 26b290f5763e72a2c1ec8816561c5901
domain: vacuum
entity_id: 9b236a2cbcdce22ac2f80e9225479d7f
type: clean