Tweaking automation flow

This commit is contained in:
Jeffrey Stone 2020-11-14 10:27:35 -05:00
parent a2c75ab131
commit eb44689590
3 changed files with 52 additions and 106 deletions

View File

@ -1,4 +1,3 @@
- id: upstairs_fan_on - id: upstairs_fan_on
alias: Upstairs Fan On alias: Upstairs Fan On
initial_state: true initial_state: true
@ -15,7 +14,6 @@
- data: - data:
entity_id: switch.upstairs_fan entity_id: switch.upstairs_fan
service: switch.turn_on service: switch.turn_on
- id: '1562066108032' - id: '1562066108032'
alias: Living Room Fan On alias: Living Room Fan On
initial_state: true initial_state: true
@ -54,57 +52,17 @@
- data: - data:
entity_id: switch.croft_fan entity_id: switch.croft_fan
service: switch.turn_off service: switch.turn_off
# - id: turn_off_ha_speaker
# alias: Turn Off HA Speaker
# trigger:
# - platform: state
# entity_id: media_player.hass_speaker
# from: 'playing'
# to: 'idle'
# action:
# - service: media_player.turn_off
# entity_id: media_player.hass_speaker
# initial_state: true
- id: turn_off_kitchen_speaker - id: turn_off_kitchen_speaker
alias: Turn Off Kitchen Display alias: Turn Off Kitchen Display
trigger: trigger:
- platform: state - platform: state
entity_id: media_player.googlehomehub3492 entity_id: media_player.googlehomehub3492
from: 'playing' from: playing
to: 'idle' to: idle
action: action:
- service: media_player.turn_off - service: media_player.turn_off
entity_id: media_player.googlehomehub3492 entity_id: media_player.googlehomehub3492
initial_state: true initial_state: true
# - id: turn_off_ha_speaker
# alias: Turn Off HA Speaker
# trigger:
# - platform: state
# entity_id: media_player.ha_speaker
# from: 'playing'
# to: 'idle'
# action:
# - service: switch.turn_off
# entity_id: switch.ha_speaker
# - service: media_player.turn_off
# entity_id: media_player.ha_speaker
# - service: script.kill_this_ride
# initial_state: true
# - id: save_old_covid_stats
# alias: Old Covid Stats archive
# trigger:
# - platform: time
# at: '15:12:15'
# action:
# - service: script.save_old_covid_stats
# initial_state: true
- id: kitchen_occupency_lighting - id: kitchen_occupency_lighting
alias: Kitchen Occupency Lighting alias: Kitchen Occupency Lighting
initial_state: true initial_state: true
@ -116,8 +74,6 @@
- service: script.dog_mode_on - service: script.dog_mode_on
- service: script.kitchen_lights_on - service: script.kitchen_lights_on
- service: script.kitchen_lights_night - service: script.kitchen_lights_night
- id: driveway_motion_lighting - id: driveway_motion_lighting
alias: Driveway Motion Lighting alias: Driveway Motion Lighting
initial_state: true initial_state: true
@ -128,7 +84,7 @@
condition: condition:
- condition: state - condition: state
entity_id: sun.sun entity_id: sun.sun
state: 'below_horizon' state: below_horizon
action: action:
- service: switch.turn_on - service: switch.turn_on
entity_id: switch.driveway_light entity_id: switch.driveway_light
@ -136,41 +92,6 @@
minutes: 3 minutes: 3
- service: switch.turn_off - service: switch.turn_off
entity_id: switch.driveway_light entity_id: switch.driveway_light
# - id: show_time
# alias: Show Time
# initial_state: true
# trigger:
# - platform: state
# entity_id: media_player.home_theater
# to: 'playing'
# condition:
# - condition: state
# entity_id: light.theater_light
# state: 'on'
# action:
# - service: script.turn_on
# entity_id: script.theater_lights_down
# - service: script.turn_off
# entity_id: script.theater_lights_up
# - id: show_time start paused
# alias: Show Time Start Paused
# initial_state: true
# trigger:
# - platform: state
# entity_id: media_player.home_theater
# to: 'idle'
# condition:
# - condition: state
# entity_id: script.theater_lights_down
# state: 'on'
# action:
# - service: script.turn_off
# entity_id: script.theater_lights_down
- id: show_time_over - id: show_time_over
alias: Show Time over alias: Show Time over
initial_state: true initial_state: true
@ -183,7 +104,6 @@
action: action:
- service: scene.turn_on - service: scene.turn_on
entity_id: scene.theater_dark entity_id: scene.theater_dark
- id: theater_fan_on - id: theater_fan_on
alias: Theater Fan On alias: Theater Fan On
initial_state: true initial_state: true
@ -199,7 +119,6 @@
- data: - data:
entity_id: switch.theater_fan entity_id: switch.theater_fan
service: switch.turn_on service: switch.turn_on
- id: theater_fan_off - id: theater_fan_off
alias: Theater Fan Off alias: Theater Fan Off
initial_state: true initial_state: true
@ -215,7 +134,6 @@
- data: - data:
entity_id: switch.theater_fan entity_id: switch.theater_fan
service: switch.turn_on service: switch.turn_on
- id: theater_light_pressed_up - id: theater_light_pressed_up
alias: Theater Light Pressed Up alias: Theater Light Pressed Up
initial_state: true initial_state: true
@ -225,7 +143,6 @@
action: action:
- service: scene.turn_on - service: scene.turn_on
entity_id: scene.theater_bright entity_id: scene.theater_bright
- id: theater_light_pressed_down - id: theater_light_pressed_down
alias: Theater Light Pressed Down alias: Theater Light Pressed Down
initial_state: true initial_state: true
@ -235,3 +152,30 @@
action: action:
- service: scene.turn_on - service: scene.turn_on
entity_id: scene.theater_dark 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.ah_report
data_template:
speech_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
}}.
'
call_snark_door_motion: 1
mode: single
initial_state: true

View File

@ -399,6 +399,7 @@ automation:
- id: welcome_home - id: welcome_home
alias: Welcome Home alias: Welcome Home
mode: queued
trigger: trigger:
- platform: state - platform: state
entity_id: entity_id:
@ -413,9 +414,10 @@ automation:
entity_id: sensor.family_status entity_id: sensor.family_status
state: Home state: Home
action: action:
- service: script.family_is_home # - service: script.family_is_home
- wait_template: >- # - wait_template: >-
{{ states.binary_sensor.laundry_room_door.state == 'on' }} # {{ states.binary_sensor.laundry_room_door.state == 'on' }}
- delay: 00:01:30
- service: script.ah_report - service: script.ah_report
data_template: data_template:
call_interuption: 1 call_interuption: 1

View File

@ -530,10 +530,10 @@ automation:
value_template: '{{ states.sensor.back_porch.attributes.strike_count | int == states.sensor.lightning_total_count.state | int }}' value_template: '{{ states.sensor.back_porch.attributes.strike_count | int == states.sensor.lightning_total_count.state | int }}'
for: for:
minutes: 20 minutes: 20
condition: # condition:
- condition: state # - condition: state
entity_id: input_boolean.lightning_warning # entity_id: input_boolean.lightning_warning
state: 'on' # state: 'on'
action: action:
- service: script.text_notify - service: script.text_notify
data_template: data_template: