1
0

Auto turn lights when it's dark

This commit is contained in:
Przemek Grondek 2022-08-12 20:30:47 +02:00
parent 46bfa9c01d
commit ac24a3b7c0
2 changed files with 34 additions and 1 deletions

View File

@ -4,7 +4,7 @@
trigger: trigger:
- platform: numeric_state - platform: numeric_state
entity_id: sensor.office_illuminance entity_id: sensor.office_illuminance
below: '20' below: '25'
for: for:
hours: 0 hours: 0
minutes: 1 minutes: 1
@ -16,6 +16,36 @@
- cover.office_blinds - cover.office_blinds
- cover.dining_blinds - cover.dining_blinds
- id: brightness-dark-lights-on
alias: '[Brightness] Dark - turn on lights'
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.office_illuminance
below: '50'
for:
hours: 0
minutes: 1
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'
action:
- service: cover.close_cover
target:
entity_id:
- cover.office_blinds
- cover.dining_blinds
- id: brightness-ok - id: brightness-ok
alias: '[Brightness] OK' alias: '[Brightness] OK'
mode: single mode: single

View File

@ -493,6 +493,9 @@ binary_sensor:
- name: Banner Ping - name: Banner Ping
platform: ping platform: ping
host: 192.168.50.22 host: 192.168.50.22
- name: Hawkeye Ping
platform: ping
host: 192.168.50.23
switch: switch:
# - platform: zoneminder # - platform: zoneminder