I’m using Home Assistant to schedule the nightly charging of my EV. Until now I justed flipped a switch named “DriveTomorrow” to false if I don’t need to get to work tomorrow.
Now I have the idea to get an automation to check everyday at 22:00 if there is a Calender Entry named “Homeoffice” in my calender the next day and make the decision based on that and set DriveTomorrow to either true of false.
I spend the whole night but can’t find a solution for that problem. I can’t use the calender trigger because I want to trigger it at a specific time and I also want it to trigger if there is NO such a event and set DriveTomorrow to true and charge the EV.
I use Google Calendar and have all-day events with various sub-calendars.
Create a sub-calendar “Home Office” and that calendar will show in HA.
In that calendar you create an all-day event with whatever title you want on the desired days.
Trigger
Calendar Home Office
time off-set minus 2 (as it is an all-day event, it starts at midnight, therefore 10 pm is minus 2. Action
whatever you want.
this is not just working perfectly, I also love the elegance of that solution. Using a “hack” to turn_on or turn_off a boolean is something I never saw. And the calender magic itself is wonderfu.