268 lines
6.4 KiB
YAML
268 lines
6.4 KiB
YAML
- id: family_has_arrived
|
|
alias: Family Has arrived
|
|
trigger:
|
|
- entity_id: sensor.family_status
|
|
from: Away
|
|
platform: state
|
|
to: Home
|
|
- platform: zone
|
|
entity_id: person.jeffrey
|
|
zone: zone.home
|
|
event: enter
|
|
- entity_id: device_tracker.mal
|
|
from: not_home
|
|
platform: state
|
|
to: home
|
|
- platform: zone
|
|
entity_id: person.katherine
|
|
zone: zone.home
|
|
event: enter
|
|
condition: []
|
|
action:
|
|
- service: script.family_is_home
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.attributes.friendly_name == "jeffrey"
|
|
}}'
|
|
sequence:
|
|
- service: script.jeff_destination_na
|
|
data: {}
|
|
- service: input_boolean.turn_off
|
|
data: {}
|
|
entity_id: input_boolean.jeff_travel_monitor
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.attributes.friendly_name =="katherine"
|
|
}}'
|
|
sequence:
|
|
- service: input_boolean.turn_off
|
|
data: {}
|
|
entity_id: input_boolean.kat_travel_monitor
|
|
default: []
|
|
- service: script.driveway_on
|
|
data: {}
|
|
mode: single
|
|
initial_state: true
|
|
- id: family_has_left
|
|
alias: Family Has Left
|
|
initial_state: true
|
|
trigger:
|
|
- entity_id: sensor.family_status
|
|
from: Home
|
|
platform: state
|
|
to: Away
|
|
- platform: webhook
|
|
webhook_id: away_webhook
|
|
- entity_id: group.family
|
|
from: home
|
|
platform: state
|
|
to: not_home
|
|
mode: single
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
action:
|
|
- service: script.family_is_away
|
|
- id: upstairs_fan_on
|
|
alias: Upstairs Fan On
|
|
initial_state: true
|
|
trigger:
|
|
- entity_id: binary_sensor.upstairs_occupancy
|
|
from: 'Off'
|
|
platform: state
|
|
to: 'On'
|
|
condition:
|
|
- above: 73
|
|
condition: numeric_state
|
|
entity_id: sensor.upstairs_temperature
|
|
action:
|
|
- data:
|
|
entity_id: switch.upstairs_fan
|
|
service: switch.turn_on
|
|
- id: '1562066108032'
|
|
alias: Living Room Fan On
|
|
initial_state: true
|
|
trigger:
|
|
- entity_id: binary_sensor.living_room_occupancy
|
|
from: 'off'
|
|
platform: state
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: switch.livingroom_fan
|
|
state: 'off'
|
|
- above: 73
|
|
condition: numeric_state
|
|
entity_id: sensor.living_room_temperature
|
|
action:
|
|
- data:
|
|
entity_id: switch.livingroom_fan
|
|
service: switch.turn_on
|
|
- id: '1562067639239'
|
|
alias: Upstairs Fan Off
|
|
initial_state: true
|
|
trigger:
|
|
- entity_id: binary_sensor.upstairs_occupancy
|
|
from: 'on'
|
|
platform: state
|
|
to: 'off'
|
|
condition:
|
|
- condition: state
|
|
entity_id: switch.croft_fan
|
|
state: 'on'
|
|
- below: 72
|
|
condition: numeric_state
|
|
entity_id: sensor.upstairs_temperature
|
|
action:
|
|
- data:
|
|
entity_id: switch.croft_fan
|
|
service: switch.turn_off
|
|
- id: turn_off_kitchen_speaker
|
|
alias: Turn Off Kitchen Display
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.googlehomehub3492
|
|
from: playing
|
|
to: idle
|
|
action:
|
|
- service: media_player.turn_off
|
|
entity_id: media_player.googlehomehub3492
|
|
initial_state: true
|
|
- id: kitchen_occupency_lighting
|
|
alias: Kitchen Occupency Lighting
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.kitchen_motion
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: below_horizon
|
|
action:
|
|
- service: script.dog_mode_on
|
|
- choose:
|
|
- conditions:
|
|
- condition: time
|
|
after: 05:30:00
|
|
before: '22:30:00'
|
|
sequence:
|
|
- scene: scene.normal_kitchen_lighting
|
|
- conditions:
|
|
- condition: time
|
|
after: '22:30:00'
|
|
before: 05:30:00
|
|
sequence:
|
|
- scene: scene.diminished_kitchen_lighting
|
|
- delay: 00:18:00
|
|
- scene: scene.kitchen_lighting_off
|
|
default: []
|
|
initial_state: true
|
|
mode: single
|
|
- id: driveway_motion_lighting
|
|
alias: Driveway Motion Lighting
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.aarlo_motion_driveway
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: below_horizon
|
|
action:
|
|
- service: switch.turn_on
|
|
entity_id: switch.driveway_light
|
|
- delay:
|
|
minutes: 3
|
|
- service: switch.turn_off
|
|
entity_id: switch.driveway_light
|
|
- id: show_time_over
|
|
alias: Show Time over
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.theater_tv
|
|
to: 'off'
|
|
for:
|
|
minutes: 20
|
|
action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.theater_dark
|
|
- id: theater_fan_on
|
|
alias: Theater Fan On
|
|
initial_state: true
|
|
trigger:
|
|
- above: 74
|
|
platform: numeric_state
|
|
entity_id: sensor.theater_temperature
|
|
condition:
|
|
- condition: state
|
|
entity_id: media_player.theater_tv
|
|
state: 'on'
|
|
action:
|
|
- data:
|
|
entity_id: switch.theater_fan
|
|
service: switch.turn_on
|
|
- id: theater_fan_off
|
|
alias: Theater Fan Off
|
|
initial_state: true
|
|
trigger:
|
|
- below: 72
|
|
platform: numeric_state
|
|
entity_id: sensor.theater_temperature
|
|
condition:
|
|
- condition: state
|
|
entity_id: media_player.theater_tv
|
|
state: 'off'
|
|
action:
|
|
- data:
|
|
entity_id: switch.theater_fan
|
|
service: switch.turn_on
|
|
- id: theater_light_pressed_up
|
|
alias: Theater Light Pressed Up
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.theater_light_up
|
|
action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.theater_bright
|
|
- id: theater_light_pressed_down
|
|
alias: Theater Light Pressed Down
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.theater_light_down
|
|
action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.theater_dark
|
|
- id: motion_detected_at_front_door
|
|
alias: motion_detected_at_front_door
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.aarlo_motion_front_door
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.audible_notifications
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.front_door
|
|
state: 'off'
|
|
action:
|
|
- service: script.jarvis_voice
|
|
data_template:
|
|
who: '{{ states.sensor.room_audio.state }}'
|
|
message: '{{ [ "I have detected motion at the ", "Someone may be at the
|
|
", "There is movement at the ", "My sensors are picking up motion at the ",
|
|
"We appear to have a visitor at the " ] | random }} {{ trigger.to_state.attributes.friendly_name
|
|
}}.'
|
|
- delay: 00:02:00
|
|
mode: single
|
|
initial_state: true
|
|
|