1
0
Fork 0

Add more hallway automations

hallway button
  update hallway motion
  add hallway open-close
This commit is contained in:
Przemek Grondek 2021-11-12 02:21:56 +01:00
parent 04c6dd5213
commit 09107b626f
3 changed files with 126 additions and 4 deletions

View file

@ -0,0 +1,74 @@
- id: hallway-button
alias: '[Hallway] Button single press'
mode: single
trigger:
- device_id: cc4f08a2e2f0e5aebc43b87164378795
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
action:
- choose:
- conditions:
- condition: state
entity_id: light.hallway_light
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.hallway_light
- service: light.turn_off
entity_id: light.hallway_lightstrip
- conditions:
- condition: state
entity_id: light.hallway_light
state: 'off'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.hallway_light
data:
brightness: 255
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.hallway_light
data:
brightness: 255
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.hallway_lightstrip
data:
brightness_pct: 10
hs_color:
- 255
- 100
- id: hallway-button-double
alias: '[Hallway] Button double press'
mode: single
trigger:
- device_id: cc4f08a2e2f0e5aebc43b87164378795
domain: zha
platform: device
type: remote_button_double_press
subtype: remote_button_double_press
action:
- service: script.leave_home

View file

@ -47,11 +47,10 @@
- service: light.turn_on
entity_id: light.hallway_lightstrip
data:
brightness_pct: 5
rgb_color:
brightness_pct: 10
hs_color:
- 255
- 0
- 0
- 100
- id: hallway-motion-off
alias: '[Hallway] Motion Off'

View file

@ -0,0 +1,49 @@
- id: hallway-open-close
alias: '[Hallway] Open door'
mode: single
trigger:
- type: opened
platform: device
device_id: 671a24524db60c56b0a182ac816faf20
entity_id: binary_sensor.front_door_open_close
domain: binary_sensor
condition: [ ]
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.hallway_light
data:
brightness: 255
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.hallway_light
data:
brightness: 255
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.hallway_lightstrip
data:
brightness_pct: 10
hs_color:
- 255
- 100