Ever since the changes to HA that added the mode switch to automations, I have been having an automation that is failing and I haven’t been able to fix it. I have 2 automations, one that turns on our water heater 4 set times per day and another automation that turns it off after 30 minutes no matter the time. It turns it off after 30 mins even if it was started manually.
Ever since the changes to automations that added the mode differences, my start up timer has been failing for two out of the 4 run times each morning. The automation isn’t even complex. It was generated completely with the visual tool. No hand editing needed. Although there is one goof in the output that I thought may have been the culprit but maybe not. The automation turns my water heater on at 5:10, 6:45, 7:20 and 12:00 (noon). Only the 7:20 and noon ones have been firing ever since the update to HA.
Here is the exerpt of my automations.yaml. Oddly enough when I open and save the automation from configuration/automations/WaterHeater-TurnOnSchedule, the yaml that gets generated does not have single quotes ONLY on the 5:10 time. All the other times have single quotes. I added the single quotes below in an attempt to get it to run, but it still is not. I have also tried SINGLE and RESTART modes. Both fail.
- id: '1574911629511'
alias: WaterHeater-TurnOnSchedule
description: ''
trigger:
- at: '05:10'
platform: time
- at: '6:45'
platform: time
- at: '7:20'
platform: time
- at: '12:00'
platform: time
condition: []
action:
- device_id: 04484329265e4e819bb4df990fa0087d
domain: switch
entity_id: switch.jasco_products_unknown_type_4f44_id_3032_switch
type: turn_on
mode: single
Ok, I’ve tried it a few days with both versions of the changes you suggested… removing the 0 in 05:10 first. No change for a few days. Then tried it moving the times to all one block in your 2nd version. Same thing. It still seems like the schedule completely misses the first two firings of the schedule. What log file can I look in to see if it is the zwave not communicating or if the schedule simply isn’t doing what it’s supposed to do?
Just in case anyone didn’t know. Cold showers in the morning are a hoot. You should try it some time.
Even though it was built by the system itself? I did not create the yaml and did not modify it until someone suggested removing the 0 on the 5:10 and putting the schedules together. I’ll paste in my entire automations script… because it may actually be the part that shuts it down that is the problem instead of the part that fires it. I’m getting desperate so pasting the whole thing so maybe we can find issue before my wife disowns me for taking cold showers. There are only 2 automations that deal with water heater. The one that turns off ensures that no matter how it starts, it should only run for 30 minutes.
OMG…
Have you checked the logbook to see if the automation is even being triggered? Maybe one of the other ones is killing it.
In my Lovelace I show last_triggered on an entities card for some of my automations if I want to see when it was last_triggered. Maybe try that.
Seems like nothing is wrong with your time triggers to me and the leading ‘0’ isn’t an issue.
History shows it being triggered. MOST of the time, only the 7:30 and noon one trigger though. The other 2 rarely trigger. This automation worked perfectly before the addition of the other types of automation restart stuff they did. It started acting wonky with that release.
Ok… first attempt yielded safe mode. I copied and pasted (including spaces) directly from what you posted starting with trigger and replaced mine from trigger down and then just edited the times. That yielded a safe mode on reboot. So I had to tweak your spacing just a touch or it wouldnt validate or boot on my system. Here is what I wound up with.
But now I am back to it partially working. Today it only fired at noon.
Adjust the scheduled times, save it, run Check Configuration. It should pass. If it fails, there may be something wrong with where or how you are storing automations.
I also am intrigued by this. Especially since it was working before the Home assistant upgrade that added the new automation modes. Yesterday I completely deleted the automation in question and re-added it 100% using the wizard, except I used the “edit as YAML” option for the trigger times. Screenshot is here.
This morning already at least two of the times have failed to fire off. The little blip on the graph is me rebooting the server between when two of these events should have fired.