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:
- platform: numeric_state
entity_id: sensor.office_illuminance
below: '20'
below: '25'
for:
hours: 0
minutes: 1
@ -16,6 +16,36 @@
- cover.office_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
alias: '[Brightness] OK'
mode: single

View File

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