Hi there !
I have a problem that I can’t manage to get around !
I want to setup my vacuum to start at 10:00 , but only when my wife and I are not at home.
I managed to setup device tracker, and to trigger the vacuum with time trigger + ONE device “not_home” condition.
As soon I add the second device, it doesn’t work anymore !?
Any clues ?
This is the script I have in automations.yaml :
The template is using them as ‘and’. So both device_trackers need to be in the state ‘not_home’. Your format is correct accept for the fact that this device tracker has a capital in it: device_tracker.Ludovic. Remove the capital L. No entity_id’s should ever have capitals anywhere… ever.
Other than that, verify that the two device_trackers actually go to the state not_home. If they don’t you’ll have to change your script to handle that.
In general the automation looks good. Accept, when a device is not home the device_tracker’s state is not always ‘not_home’. It may be the name of a zone. Typically it’s better to do something like:
This may not be your problem, though. Check the spelling of the device_tracker’s, and as @petro says, entity_id’s should always be lower case. Look in known_devices.yaml, or just look on the States page to see the actual entity_id’s of your device_trackers.
Thanks to both of you .
I’ll have a look at the second template, I find it easier to read, as I’m a programmer
The error was in facts due to the Capital Ludovic, I’ll correct this !