1
0
ansible-home-assistant/configuration/automations/office-brightness.yaml

154 lines
3.6 KiB
YAML
Raw Normal View History

- id: office-brightness-dark
alias: '[Brightness] Dark - close covers'
2022-04-02 13:34:02 +00:00
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
2022-08-12 18:30:47 +00:00
below: '25'
2022-04-02 13:34:02 +00:00
for:
hours: 0
minutes: 1
seconds: 0
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
2022-04-02 13:34:02 +00:00
action:
- service: cover.close_cover
target:
entity_id:
2022-05-13 22:51:12 +00:00
- cover.office_blinds
2022-04-02 13:34:02 +00:00
- cover.dining_blinds
- id: office-brightness-dark-lights-on
2022-08-12 18:30:47 +00:00
alias: '[Brightness] Dark - turn on lights'
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
2023-04-22 18:03:39 +00:00
below: '200'
2022-08-12 18:30:47 +00:00
for:
hours: 0
2022-10-19 20:44:51 +00:00
minutes: 5
2022-08-12 18:30:47 +00:00
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'
2023-04-22 18:03:39 +00:00
- condition: state
entity_id: binary_sensor.presence_sensor_fp2_office
state: 'on'
2022-10-19 20:44:51 +00:00
- condition: state
entity_id: input_select.home_mode
state: Day
2022-08-12 18:30:47 +00:00
action:
2022-08-13 17:17:39 +00:00
- service: script.office_lights_on
- id: office-brightness-ok-lights-off
2022-08-19 18:39:11 +00:00
alias: '[Brightness] Dark - turn off lights'
2022-08-13 17:17:39 +00:00
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '250'
2022-08-13 17:17:39 +00:00
for:
hours: 0
minutes: 1
seconds: 0
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
2022-08-13 17:17:39 +00:00
action:
- service: script.office_lights_off
2022-08-12 18:30:47 +00:00
- id: office-brightness-ok
alias: '[Brightness] OK - open covers'
2022-04-02 13:34:02 +00:00
mode: single
trigger:
2022-11-19 11:38:21 +00:00
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
2023-04-08 20:28:51 +00:00
below: '2000'
2022-11-19 11:38:21 +00:00
for:
hours: 0
minutes: 0
seconds: 30
2022-04-02 13:34:02 +00:00
- platform: numeric_state
entity_id: sensor.office_illuminance
2022-04-05 21:57:55 +00:00
above: '30'
2023-04-08 20:28:51 +00:00
below: '2000'
2022-04-02 13:34:02 +00:00
for:
hours: 0
minutes: 1
seconds: 0
2022-10-26 10:32:24 +00:00
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
2023-04-08 20:28:51 +00:00
below: '2000'
2022-10-26 10:32:24 +00:00
for:
hours: 0
minutes: 2
seconds: 0
- platform: numeric_state
entity_id: sensor.office_illuminance
above: '30'
2023-04-08 20:28:51 +00:00
below: '2000'
2022-10-26 10:32:24 +00:00
for:
hours: 0
minutes: 3
seconds: 0
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
2022-04-02 13:34:02 +00:00
action:
2022-10-19 20:47:50 +00:00
- choose:
- conditions:
- condition: numeric_state
entity_id: cover.office_blinds
attribute: current_position
2022-10-24 10:13:06 +00:00
below: 51
2022-10-19 20:47:50 +00:00
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
2022-04-02 13:34:02 +00:00
- id: office-brightness-bright
alias: '[Brightness] Bright - close covers'
2022-04-02 13:34:02 +00:00
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
2023-04-08 20:28:51 +00:00
above: '2500'
2022-04-02 13:34:02 +00:00
for:
hours: 0
minutes: 1
seconds: 0
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
2022-04-02 13:34:02 +00:00
action:
- service: cover.close_cover
target:
entity_id:
- cover.dining_blinds
- service: script.office_blinds_down