i have reset up hassio on new system and wrote most of the automatons new, some I just took over from the old installation as they worked fine and there was not reason to change them.
But suddenly do not work and some work. I am not sure why this is.
Es example this automation:
- alias: turn on vacuum if no one is home
trigger:
platform: time
at: '10:00:00'
condition:
- condition: time
after: '09:00'
before: '12:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: group.family
state: 'not_home'
action:
service: vacuum.start
entity_id: vacuum.eva
Simple Automation.
I double checked all, the entities are correct, if I call the service by hand, the vacuum does start, also the conditions triggers are fine.
Even if I star the animation by hand it works ( I know that the trigger then is not checked).
So the only thing I can imagine could be the start trigger, the time, but how can I check it ?
There is also nothing in the logs in combination with this automation.
How are you coming to the conclusion that it isn’t working? Unless the time is currently just before 10am, it won’t trigger, so I’m guessing you are clicking the ‘trigger’ button after opening up the automation entity in the dev-states panel? What happens if you do that?
EDIT: I just noticed that you had 2 different times, so I’m guessing you changed the time and waited for it to pass. Try a the manual trigger to prove that the action works. Did you reload automations or restart HA after making the changes?
haubuntu:~$ timedatectl
Local time: Mon 2019-02-04 12:56:53 CET
Universal time: Mon 2019-02-04 11:56:53 UTC
RTC time: Mon 2019-02-04 11:56:53
Time zone: Europe/Berlin (CET, +0100)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
I added them as sensor, and still no luck.
So i changed it to a state triger and this is working fine now.
I can´t remember do add a time sensor anytime in my config, is this new and i missed it ?
Since when is time a sensor ?
Anyway it does work now !
And this is explains also why some other, times based automations do not work
Thanks a lot !
Here, just for the records the working automation AFTER adding the time and date component as sensor.
- alias: turn on vacuum if no one is home
trigger:
platform: state
entity_id: sensor.time
to: '10:00'
condition:
- condition: time
after: '09:00'
before: '22:00'
weekday:
- mon
- tue
- wed1
- thu
- fri
- condition: state
entity_id: group.family
state: 'not_home'
action:
service: vacuum.start
entity_id: vacuum.eva
The time sensor has been around since 2015 according to the document history. It is not required to be able to use the time platform as a trigger. It’s just a sensor you can use to display the time in the front end or use to update templates that use now().
I have automations very similar to yours that trigger on the time platform (I’m using HA v 0.86.4). They are working. It is very odd that yours is not.
- id: garbage_reminder
alias: 'Garbage Reminder'
trigger:
platform: time
at: '20:00:00'
condition:
condition: time
weekday:
- sun
action:
Whst is the state of the automation? If you look at the automation in the dev-states page it should show as ‘on’. If not then you need to turn it to ‘on’ (enable it).
I have a similar issue since one of the latest releases. Problem seems to have to do with the fact that my presence groups sometimes show ‘On’ or ‘Off’ as their status, instead of ‘Home’ and ‘Not home’.