My ultimate attempt is to have the front porch lights turned on by the time I pull down my driveway. I decided to use CloudMQTT (not sure if that is a wise choice) but when I get home, my lights are not on.
To detect and publish my location to CloudMQTT, I am using OwnTracks.
Any ideas as to what I’m doing wrong or should be doing different?
Own tracks is configured to use Significant Change Monitoring Mode, but also used Move Monitoring Mode which didn’t work.
This is from my configuration.yaml:
mqtt:
broker: m16.cloudmqtt.com
port:
keepalive: 60
username:
password:
owntracks:
max_gps_accuracy: 200
mqtt_topic: "owntracks/#"
events_only: false
zone:
- name: Home
latitude:
longitude:
radius: 500
icon: mdi:worker
This is my automation.yaml
- alias: Lights - Front Porch - Come Home After Sunset
trigger:
platform: state
entity_id: device_tracker.phone_capo
to: 'home'
condition:
condition: sun
after: sunset
action:
- service: light.turn_on
data:
brightness: 255
entity_id:
- light.porch
- delay: '00:04:00'
- service: light.turn_off
data:
entity_id:
- light.porch