1
0
ansible-home-assistant/configuration/automations/kitchen-motion.yaml

127 lines
3.9 KiB
YAML
Raw Normal View History

- id: kitchen-lights-on
alias: '[Kitchen] Lights On'
2021-01-12 23:34:38 +00:00
mode: single
trigger:
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
from: 'off'
to: 'on'
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: numeric_state
entity_id: sensor.kitchen_motion_sensor_illuminance
below: '16'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 5
kelvin: 2700
2021-05-10 10:24:31 +00:00
- id: kitchen-vibration
alias: '[Kitchen] Vibration'
trigger:
- platform: state
entity_id: binary_sensor.kitchen_worktop_accelerometer
to: 'on'
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: numeric_state
entity_id: sensor.kitchen_motion_sensor_illuminance
below: '21'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 5
kelvin: 2700
- id: kitchen-lights-off
alias: '[Kitchen] Lights Off'
2021-01-12 23:34:38 +00:00
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
for: '0:02:00'
from: 'on'
to: 'off'
- platform: state
entity_id: binary_sensor.kitchen_worktop_accelerometer
for: '0:02:00'
from: 'on'
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.kitchen_motion_sensor
state: 'off'
for: '0:02:00'
2022-04-13 19:28:01 +00:00
- condition: not
conditions:
- condition: state
entity_id: binary_sensor.kitchen_worktop_accelerometer
state: 'off'
for: '0:02:00'
2021-01-12 23:34:38 +00:00
action:
- service: light.turn_off
entity_id: light.kitchen_lights