Calendar trigger / event #358
Replies: 3 comments 4 replies
-
For example, I have this template sensor and I am trying to do this in pyscript.
|
Beta Was this translation helpful? Give feedback.
-
I think we are missing support for calendar in pyscript. Maybe someone else can correct me if I am wrong. You can trigger on the events from calendar though, like in below example:
resulting in this:
However I don't know how to access further information from 'context' so it is kind of useless so far. |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
In the current version of HA (2022.5+) there's a calendar event AND a calendar trigger.
If you create an automation in HA, you can e.g. when a calender event is found and e.g. 10 minutes before that event (or after that event), you can specify an action.
Since I'm more fond of pyscript, I'm looking for a way to do this in pyscript.
Any suggestion?
One of my use cases:
Situation:
my wife works one week, from early in the morning till the afternoon, the week after that, she starts around noon till the evening
calendar (google) with working days added. So monday from 5 'till 13, tuesday from 5 'till 13, .... , the week after that, monday from 13 'till 21 h, tuesday from 13 'till 21h, .....
my wife is leaves about an hour before for her work.
I want, an hour before her shift starts, lower the temperature at the house. Half an hour after she finishes her shift, raise the temperature again.
So, I want to use an offset. Google calendar supports an offset in the message itself, but that look ugly. And, an automation that could be made in HA itself, is aparently able to use offsets too.
But, as I stated, I'm not a fan of HA automations, and would rather like to do this in pyscript.....
Any ideas someone?
Beta Was this translation helpful? Give feedback.
All reactions