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

Help needed with presence automation

$
0
0

@bedfellow wrote:

I have the following automation to sense whether my wife and myself are home or not and switch the heating on or off accordingly. It works very well and I would like to add my kids to it, but they don’t have the app installed on their phones and I want to use ping detection, which I have already set up and is functioning, but I can’t figure out how to add it to the automation. The status of ping appears to be ‘connected’ or ‘disconnected’ but adding this to the automation doesn’t work.

- id: '1575231618454'
  alias: Thermostat - We're Not Home
  description: ''
  trigger:
  - entity_id: group.parents
    platform: state
    to: not_home
  condition: []
  action:
  - service: scene.create
    data:
      scene_id: before_leaving
      snapshot_entities:
      - climate.thermostat
  - data:
      entity_id: climate.thermostat
      preset_mode: away
    service: climate.set_preset_mode

- id: '1575233619529'
  alias: Thermostat - We're Home
  description: ''
  trigger:
  - entity_id: group.parents
    platform: state
    to: home
  condition: []
  action:
  - service: scene.turn_on
    data:
      entity_id: scene.before_leaving

group.parents looks like this:

parents:
  name: Parents
  entities:
    - device_tracker.life360_me
    - device_tracker.life360_wife

The kids group is set up like this:

kids_phones:
  name: Kid's Phones
  entities:
    - binary_sensor.phone1
    - binary_sensor.phone2

and the entry in configuration.yaml is:

  - platform: ping
    name: "phone1"
    host: 192.168.1.191
    scan_interval: 60
    
  - platform: ping
    name: "phone2"
    host: 192.168.1.87
    scan_interval: 60

Posts: 13

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles