Detect Guest Mode - On

View All Rules

alias: Detect Guest Mode - On
trigger:
  platform: state
  entity_id:
    - person.john
    - person.maureen
    - person.allan
    - person.colin
    - person.irene
    - person.kayleigh
    - person.kev
    - person.khristen
    - person.mecha
    - person.scott
    - person.steve
  to: home
condition:
  condition: or
  conditions:
    - condition: state
      entity_id: person.john
      state: home
    - condition: state
      entity_id: person.maureen
      state: home
    - condition: state
      entity_id: person.allan
      state: home
    - condition: state
      entity_id: person.colin
      state: home
    - condition: state
      entity_id: person.irene
      state: home
    - condition: state
      entity_id: person.kayleigh
      state: home
    - condition: state
      entity_id: person.kev
      state: home
    - condition: state
      entity_id: person.khristen
      state: home
    - condition: state
      entity_id: person.mecha
      state: home
    - condition: state
      entity_id: person.scott
      state: home
    - condition: state
      entity_id: person.steve
      state: home
action:
  - service: input_boolean.turn_on
    data:
      entity_id: input_boolean.guest_mode
  - service: script.notify_engine
    data_template:
      channel: "visitorlog"
      value1: 'All your guest have left.'
      value2: "I've turned on guest mode"
  - condition: or
    conditions:
      - condition: state
        entity_id: input_boolean.text_notifications
        state: 'on'
  - service: notify.signal_stuart
    data:
      message: "I've turned on guest mode"


© 2020. Some rights reserved. The contents of this site is released under a Creative Commons Attribution-Share Alike license.