Change automations based on home state
This commit is contained in:
parent
ccf646b7b7
commit
dc097c7d1f
@ -1,18 +1,59 @@
|
||||
- id: bathroom-motion-on
|
||||
alias: '[Bathroom] Motion On'
|
||||
- id: bathroom-motion-day
|
||||
alias: '[Bathroom] Motion Day'
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bathroom_motion_sensor
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_select.home_mode
|
||||
state: Day
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.bathroom_lights
|
||||
data:
|
||||
brightness: 100
|
||||
kelvin: 2000
|
||||
- id: bathroom-motion-party
|
||||
alias: '[Bathroom] Motion Party'
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bathroom_motion_sensor
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_select.home_mode
|
||||
state: Party
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
- light.bathroom_1
|
||||
- light.bathroom_2
|
||||
- light.bathroom_3
|
||||
- light.bathroom_4
|
||||
- light.bathroom_lights
|
||||
- light.bathroom_mirror_lights
|
||||
data:
|
||||
brightness: 100
|
||||
kelvin: 2000
|
||||
- id: bathroom-motion-night
|
||||
alias: '[Bathroom] Motion Night'
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bathroom_motion_sensor
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_select.home_mode
|
||||
state: Night
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.bathroom_lights
|
||||
data:
|
||||
brightness: 5
|
||||
kelvin: 3200
|
||||
- id: bathroom-motion-off
|
||||
alias: '[Bathroom] Motion Off'
|
||||
mode: restart
|
||||
@ -25,7 +66,6 @@
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.bathroom_1
|
||||
- light.bathroom_2
|
||||
- light.bathroom_3
|
||||
- light.bathroom_4
|
||||
- light.bathroom_lights
|
||||
- light.bathroom_mirror_lights
|
||||
- light.bathroom_minor_lights
|
||||
|
@ -1,14 +1,42 @@
|
||||
- id: hallway-motion-on
|
||||
alias: '[Hallway] Motion On'
|
||||
- id: hallway-motion-day
|
||||
alias: '[Hallway] Motion Day'
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_motion_sensor
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_select.home_mode
|
||||
state: Day
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.hallway_lightstrip
|
||||
data:
|
||||
brightness: 100
|
||||
kelvin: 2000
|
||||
- id: hallway-motion-night
|
||||
alias: '[Hallway] Motion Night'
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.hallway_motion_sensor
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_select.home_mode
|
||||
state: Night
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.hallway_lightstrip
|
||||
data:
|
||||
brightness: 5
|
||||
rgb_color:
|
||||
- 255
|
||||
- 0
|
||||
- 0
|
||||
- id: hallway-motion-off
|
||||
alias: '[Hallway] Motion Off'
|
||||
mode: restart
|
||||
|
43
automations/files/scripts/modes.yaml
Normal file
43
automations/files/scripts/modes.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
- alias: Goodnight
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.desk_lamp
|
||||
- light.computer_lights
|
||||
- light.tv_lights
|
||||
- light.couch_lamp
|
||||
- light.table_lamp
|
||||
- light.kitchen_lights
|
||||
- light.kitchen_sink_lighstrip
|
||||
- light.bathroom_lights
|
||||
- light.shower_lights
|
||||
- light.bathroom_mirror_lights
|
||||
- light.bathroom_minor_lights
|
||||
- light.bedroom_lights
|
||||
- light.bed_lightstrip
|
||||
- light.bed_lamp
|
||||
- light.hallway_light
|
||||
- light.hallway_lightstrip
|
||||
- service: alarm_control_panel.alarm_arm_night
|
||||
entity_id: alarm_control_panel.ha_alarm
|
||||
- service: switch.turn_off
|
||||
entity_id:
|
||||
- switch.computer_outlet
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Night
|
||||
entity_id: input_select.home_mode
|
||||
mode: single
|
||||
icon: 'mdi:weather-night'
|
||||
- alias: Goodmorning
|
||||
sequence:
|
||||
- service: alarm_control_panel.alarm_arm_night
|
||||
entity_id: alarm_control_panel.ha_alarm
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Day
|
||||
entity_id: input_select.home_mode
|
||||
- service: switch.turn_on
|
||||
data: { }
|
||||
entity_id: switch.computer_outlet
|
||||
mode: single
|
Loading…
Reference in New Issue
Block a user