hello again! and now im wokring on gettign something automate.
The deal im trying to do is as follows. When my wife’s phone is registered as home for the switch.dresser_fan to turn on.
This is what i put in my config file:
automation:
trigger:
platform: state
entity_id: device_tracker.androidXXXX
from: 'not_home'
to: 'home'
action:
service: switch.turn_on
enitity_id: switch.dresser_fan
```
So what am i missing here? im using my asus router to track presence, and ive watched it register changes in presence just fine.
once again, thanks for being such a helpful and welcoming community. once im good enough to know something ill do my best to help others out too!
EDIT: the switch im trying to turn on is a standard wemo switch
Add a second trigger, either one will fire the event:
trigger:
- platform: state
entity_id: device_tracker.androidXXX
from: 'not_home'
to: 'home'
- platform: state
entity_id: device_tracker.device2
from: 'not_home'
to: 'home'
ah ok, i had gone and made it a whole separate alias.
i then want to make it so that if both devices arent there it turns off…i can do this just by saying
entity_id: device_1, device_2
from: 'home'
to: 'not_home'
and separating only with that comma right? that will make it so that if both devices are not_home it will switch.turn_off, but not only when one leaves.
I’ll have to defer to the crowd on that one. I’m not sure if comma separating the entities is treated as an “and” or “or”. If it’s “or” you could use that in place of what I recommended above, but in that case you would want to probably create a group with those 2 devices and use that as the trigger for your second problem, that way the group will only change to “not_home” when they are both away. Again, I’m not entirely clear on that.