Change automations based on home state
This commit is contained in:
parent
ccf646b7b7
commit
dc097c7d1f
@ -1,18 +1,59 @@
|
|||||||
- id: bathroom-motion-on
|
- id: bathroom-motion-day
|
||||||
alias: '[Bathroom] Motion On'
|
alias: '[Bathroom] Motion Day'
|
||||||
mode: restart
|
mode: restart
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.bathroom_motion_sensor
|
entity_id: binary_sensor.bathroom_motion_sensor
|
||||||
from: 'off'
|
from: 'off'
|
||||||
to: 'on'
|
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:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.bathroom_1
|
- light.bathroom_lights
|
||||||
- light.bathroom_2
|
- light.bathroom_mirror_lights
|
||||||
- light.bathroom_3
|
data:
|
||||||
- light.bathroom_4
|
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
|
- id: bathroom-motion-off
|
||||||
alias: '[Bathroom] Motion Off'
|
alias: '[Bathroom] Motion Off'
|
||||||
mode: restart
|
mode: restart
|
||||||
@ -25,7 +66,6 @@
|
|||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.bathroom_1
|
- light.bathroom_lights
|
||||||
- light.bathroom_2
|
- light.bathroom_mirror_lights
|
||||||
- light.bathroom_3
|
- light.bathroom_minor_lights
|
||||||
- light.bathroom_4
|
|
||||||
|
@ -1,14 +1,42 @@
|
|||||||
- id: hallway-motion-on
|
- id: hallway-motion-day
|
||||||
alias: '[Hallway] Motion On'
|
alias: '[Hallway] Motion Day'
|
||||||
mode: restart
|
mode: restart
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.hallway_motion_sensor
|
entity_id: binary_sensor.hallway_motion_sensor
|
||||||
from: 'off'
|
from: 'off'
|
||||||
to: 'on'
|
to: 'on'
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_select.home_mode
|
||||||
|
state: Day
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id: light.hallway_lightstrip
|
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
|
- id: hallway-motion-off
|
||||||
alias: '[Hallway] Motion Off'
|
alias: '[Hallway] Motion Off'
|
||||||
mode: restart
|
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