initial commit
This commit is contained in:
37
configuration/automation/light_auto_kitchen.yaml
Normal file
37
configuration/automation/light_auto_kitchen.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
- alias: '[Kitchen] Lights Auto On'
|
||||
initial_state: 'true'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id:
|
||||
- input_boolean.occupancy_kitchen
|
||||
to: 'on'
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kitchen_light_state
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: template
|
||||
value_template: '{{ ( states.sensor.presence_kitchen_light_level.state | int ) < ( states.input_number.app_light_light_lux_mininum.state | int ) }}'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kitchen_light_state
|
||||
|
||||
- alias: '[Kitchen] Lights Auto Off'
|
||||
initial_state: 'true'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id:
|
||||
- input_boolean.occupancy_kitchen
|
||||
to: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kitchen_light_state
|
Reference in New Issue
Block a user