151 lines
3.5 KiB
YAML
151 lines
3.5 KiB
YAML
- id: office-brightness-dark
|
|
alias: '[Brightness] Dark - close covers'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
below: '25'
|
|
for:
|
|
hours: 0
|
|
minutes: 1
|
|
seconds: 0
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
action:
|
|
- service: cover.close_cover
|
|
target:
|
|
entity_id:
|
|
- cover.office_blinds
|
|
- cover.dining_blinds
|
|
|
|
- id: office-brightness-dark-lights-on
|
|
alias: '[Brightness] Dark - turn on lights'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
below: '170'
|
|
for:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.hulk_ping
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.hawkeye_ping
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: device_tracker.amdn4684
|
|
state: 'home'
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
action:
|
|
- service: script.office_lights_on
|
|
|
|
- id: office-brightness-ok-lights-off
|
|
alias: '[Brightness] Dark - turn off lights'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
above: '250'
|
|
for:
|
|
hours: 0
|
|
minutes: 1
|
|
seconds: 0
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
action:
|
|
- service: script.office_lights_off
|
|
|
|
- id: office-brightness-ok
|
|
alias: '[Brightness] OK - open covers'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
above: '30'
|
|
below: '2000'
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 30
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
above: '30'
|
|
below: '2000'
|
|
for:
|
|
hours: 0
|
|
minutes: 1
|
|
seconds: 0
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
above: '30'
|
|
below: '2000'
|
|
for:
|
|
hours: 0
|
|
minutes: 2
|
|
seconds: 0
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
above: '30'
|
|
below: '2000'
|
|
for:
|
|
hours: 0
|
|
minutes: 3
|
|
seconds: 0
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: cover.office_blinds
|
|
attribute: current_position
|
|
below: 51
|
|
sequence:
|
|
- service: cover.set_cover_position
|
|
data:
|
|
position: 50
|
|
target:
|
|
entity_id: cover.office_blinds
|
|
default:
|
|
- service: cover.open_cover
|
|
target:
|
|
entity_id:
|
|
- cover.dining_blinds
|
|
- service: script.office_blinds_up
|
|
|
|
- id: office-brightness-bright
|
|
alias: '[Brightness] Bright - close covers'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.office_illuminance
|
|
above: '2500'
|
|
for:
|
|
hours: 0
|
|
minutes: 1
|
|
seconds: 0
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_select.home_mode
|
|
state: Day
|
|
action:
|
|
- service: cover.close_cover
|
|
target:
|
|
entity_id:
|
|
- cover.dining_blinds
|
|
- service: script.office_blinds_down
|