I have a sunset automation with lux sensor instead of sun, this has worked all the time but has stopped working when I add time as condition. Why is that? I think it happened during my last update of hassio…
here is my automation that currentli does not work, if I remove time as condition it starts working. I dont want this automation to trigger in the middle of the day though
so you are saying that my automation was correct and should work?
I’m using the webgui to make my automations, and noticed that the condition: time is placed after the actual conditions. I wonder why it does that, I changed the code so that condition: time now is before “after:…”
It didn’t run at all, but as soon as I swapped places of the code so it looks like below it started to work!
condition:
- condition: time
after: '14:00:00'
before: '23:00:00'
The weird thing is that all was done in the webgui though. I have seen this in many of my auomations so it’s some kind of a bug? at least now I know, thanks!
This is so strange because in my case neither the first nor second version does work…
The code is pretty easy and does work perfectly when no condition is applied.
It does basically turn on an electric heater at night in case the temp goes below a certain threshold (input_number.mintemp_nil).
I’m sure that that the solution is easy to spot but really tried anything to make it work using the time condition (I’ve also tried to split the timeframe 23:00 - 23:59 and 00:00 - 7:00 with no success).
Thanks a lot tom_l.
I would you fix it?
The day is not specified, it should only consider the condition when the trigger is enabled… Regardless the day… I guess…
I will try, anyway, to set the condition from 00:00 and 07:00 and see what happens but would really like to know the best way to manage these kind of situations for future applications.
popboxgun,
the problem is not the trigger but the condition instead…
The automation does work untill I try to impose the working timeframe (23:00-07:00).
I will try anyway to change the code and see the outcome during next days (I have a quite busy week).
In fact, it was the original code implemented with suggestions.
Apparently the automation is working fine even if, in the history, I’ve found an “on” condition after 7AM… Maybe my wife? One of my daughters? Wrong code?
I will keep investigating fellas but apparently you have solved my problem.
Cheers
No way, the automation keeps being triggered after 7AM (when someone opens the window to change the air in the room). The switch has been manually turned off.