This is a perfect example for the use of AppDaemon for your automations. There is only so much you can do with Home Assistantâs internal automation system, while AppDaemon has no limitations on the automations you can do, no matter how specific and detailed you need them to be.
I have moved all of my internal Automations over to AppDaemon and now I can change my automations on the fly without restarting Home Assistant.
Scheduling something as specific as every other weekend would be easy as AppDaemon gives you direct access to all of Python, so you can use any python module, including google calendar access, as well as more advanced date scheduling scenarios.
Iâm also a BIG proponent of Node-Red, HA Bridge and HADashboard⌠the combination of Home Assistant, AppDaemon, Node-Red, HA Bridge and HADashboard have made my home a powerhouse of automation!!!
Being such a booster, maybe you should do tutorial for newbies getting started with AppDaemon. I know you have the skills to do a great job with this and it would help a lot of people out who may feel the AD is âjust for programmersâ?
I know Andrew would appreciate the help and we could add it to the knowledge base.
For one year you would have to create up to 26 automations and edit them at the start of each new year!!! Hopefully there will be a better way to go about this by then.
Anyway would something like this work?
- alias: automation for schedule 1of26
trigger:
platform: state
entity_id: sensor.date
state: '2016-10-05'
condition:
condition: state
entity_id: sensor.time
state: '16:33'
action:
service: service.do_something
entity_id: entity.you_want
Now you just have to do this again and again for every date and time you need, at least through 2016 (Potentially 8 automations).
Would also love a walk through to get started. Iâm using Docker for all my components/setup and would love to add AppDaemon and Node-Red (and HADashboard) to beef it up. My big thing is finding AppDaemon examples and a âstarting pointâ.
Coming across this while looking for an âevery other weekâ for a âtake out the recyclablesâ reminder.
I donât think that this particular example would work - at least as it is. I think you need the time to be the trigger and the time and the condition would be the date. Otherwise, youâd get a trigger as the date changes, but the condition would halt it.
I got thinking - a date can be formatted as âweek of yearâ (the first week of Jan is 1, the last week of Dec is 52). I wonder if you could format âtodayâsâ date like that, then check to see if the result is even or odd.
You are correct, I did not test the automation. I was just looking for a way to run a service on a specific date and time within HA.
This does workâŚ
- alias: automation time and date
trigger:
platform: state
entity_id: sensor.time
state: '12:30'
condition:
condition: state
entity_id: sensor.date
state: '2016-10-05'
action:
service: switch.turn_on
entity_id: switch.wemo_switch
By the way I have solved this via IFTT which as least up till now works reliable.
Created the events I need in Google calendar
Created a select_input in HASS (in my case with three option: Away, Sleep, Warm)
Created the recipes in IFTT (search for keyword). One for each input select value (so 3). For people that donât know how to do this, check out Bruhs video https://www.youtube.com/watch?v=-Tkb04xRs-o)
Recipes switch the HASS input_select to the appropriate value
Hass Automation triggers on value input_select
First I had input Booleans but as the IFTT automation triggers an âONâ only, I had to make automation to put it off when anther boolean goes âONâ. Much easier to just use input_select
i am a very big fan off appdaemon but making a automation going every other week could also be done with a template which determines if the week is odd or even.
By âodd daysâ, do you mean odd days of the month? I thought you just wanted something that was true every other day, continually. So, for example, if it is true on January 31, do you want it to be true or false on February 1?