Family State 4, 5 or 6

View All Rules

alias: Family State 4, 5 or 6
trigger:
  - entity_id: sensor.family_family_state_raw
    platform: state
    to: '4'
  - entity_id: sensor.family_family_state_raw
    platform: state
    to: '5'
  - entity_id: sensor.family_family_state_raw
    platform: state
    to: '6'
condition:
  condition: and
  conditions:
    - condition: template
      value_template: "{{ not is_state('sensor.house_scene', 'Going To Bed') }}"
    - condition: template
      value_template: "{{ not is_state('sensor.house_scene', 'Asleep') }}"
    - condition: or
      conditions:
        - condition: state
          entity_id: sensor.family_family_state_raw
          state:  '4'
        - condition: state
          entity_id: sensor.family_family_state_raw
          state:  '5'
        - condition: state
          entity_id: sensor.family_family_state_raw
          state:  '6'
action:
  - service: input_select.select_option
    data:
      entity_id: input_select.family_almost_home
      option: "No"
  - service: script.turn_on
    data:
      entity_id: script.family_state_4_5_6


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