Hi,
first of all, this is a really nice piece of SW - thanks for that.
I’m stuck in setting up an very basic automation and need some help.
Scenario is quite easy but for some reason it’s not working.
Help is really appreciated
Scenario:
I setup a command line switch which is firing if i trigger it manually.
Now I would like to switch them in dependency of my tracked phone:
At home: switch of
Not at home: switch on
Here are the relevant parts of my config:
device_tracker:
platform: ddwrt
host: 192.168.x.1
username: xxxxxx
password: xxxxxx
(–> set friendly name to ToM in known devices)
[code]switch:
platform: command_line
switches:
teste:
oncmd: sudo /root/raspberry-remote/send 10000 2 1
offcmd: sudo /root/raspberry-remote/send 10000 2 0
automation:
trigger:
platform: state
entity_id: device_tracker.ToM
state: ‘not_home’
action:
service: teste.turn_on
entity_id: switch.teste[/code]
I tried it also with platform zone (and state change from home - not_home) with iCloud tracker: no success, too.