Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Life360 Tracker Automation

$
0
0

@ekincaid wrote:

I have an automation that uses life360 and when anyone in the family gets home after dark it is supposed to turn on the Driveway Light and Porch Light, Delay 10 minutes, and then turn the lights off. It works perfectly when only one person gets home. If multiple people get home at the same time it get’s a little screwed up.

For example, my wife and I got home at the same time last night. HA reports my wife getting home at 8:21, the automation runs and the lights come on. Then it reports me getting home at 8:23, the automation runs and the lights go off. I’m pretty sure the problem is the automation being called for each person getting home. I’m just not sure how to fix it. I’m still new to this. Here’s my yaml.

- alias: Turn on Outside Lights when arriving home after dark
  description: ''
  trigger:
   - entity_id: device_tracker.life360_emory, device_tracker.life360_jaci, device_tracker.life360_sierra, device_tracker.life360_fiona
     platform: state
     from: 'not_home'
     to: 'home'
     
  condition:
    condition: state
    entity_id: sun.sun
    state: 'below_horizon'
      
  action:
   - service: switch.turn_on
     data:
       entity_id:
         - switch.shelly_shsw_25_ba70a4_1
         - switch.shelly_shsw_25_ba70a4_2
   - delay: 
       seconds: 600
   - service: switch.turn_off
     data:
       entity_id:
         - switch.shelly_shsw_25_ba70a4_1
         - switch.shelly_shsw_25_ba70a4_2

Thanks for any help. :grinning:

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>