Hello!
I am looking to use the workday sensor. Unfortunately, my work schedule is anything but regular. Is there a way to have the sensor follow a set rotation, but not specific days? If that’s not possible, what are some good ways to create a sensor from my Google Calendar where I have al of my shifts listed?
If it helps, my work schedule is like this and repeats:
Week 1: Work Monday, Tuesday, Friday, Saturday, Sunday
Week 2: Work Wednesday, Thursday
In other words, I always have the opposite days off from the week before and vice versa.
Thanks in advance!
By any chance, is there an automation that you only want to fire on your work days? I use this template condition in an automation I only want to fire at a certain time only on my work days:
condition:
- condition: template
value_template: "{{ as_timestamp(now()) | timestamp_custom('%d') == as_timestamp(state_attr('calendar.work', 'start_time')) | timestamp_custom('%d') }}"
Might be of some use to you.
I’m not exactly sure what I want to do with it yet. Which calendar do you have connected that HA retrieves data from?
Ah sorry, forgot to mention I’m using the Google Calendar integration to pull in my work calendar.
Got it. I’ll start there, integrating my Google Calendar. Thanks!