Compare commits
3 Commits
4790c98642
...
d6c21dd26f
Author | SHA1 | Date | |
---|---|---|---|
d6c21dd26f | |||
29632bb3b2 | |||
3e17e3606e |
@ -40,11 +40,21 @@
|
|||||||
entity_id: device_tracker.amdn4684
|
entity_id: device_tracker.amdn4684
|
||||||
state: 'home'
|
state: 'home'
|
||||||
action:
|
action:
|
||||||
- service: cover.close_cover
|
- service: script.office_lights_on
|
||||||
target:
|
|
||||||
entity_id:
|
- id: brightness-ok-lights-off
|
||||||
- cover.office_blinds
|
alias: '[Brightness] Dark - turn on lights'
|
||||||
- cover.dining_blinds
|
mode: single
|
||||||
|
trigger:
|
||||||
|
- platform: numeric_state
|
||||||
|
entity_id: sensor.office_illuminance
|
||||||
|
above: '60'
|
||||||
|
for:
|
||||||
|
hours: 0
|
||||||
|
minutes: 1
|
||||||
|
seconds: 0
|
||||||
|
action:
|
||||||
|
- service: script.office_lights_off
|
||||||
|
|
||||||
- id: brightness-ok
|
- id: brightness-ok
|
||||||
alias: '[Brightness] OK'
|
alias: '[Brightness] OK'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
- id: button-office-on
|
- id: office-button-light-toggle
|
||||||
alias: '[Office] Button Light'
|
alias: '[Office] Button Light'
|
||||||
|
mode: single
|
||||||
trigger:
|
trigger:
|
||||||
- device_id: 5b972523e427721ec88e095994f7cc16
|
- device_id: 5b972523e427721ec88e095994f7cc16
|
||||||
domain: zha
|
domain: zha
|
||||||
@ -7,43 +8,9 @@
|
|||||||
type: remote_button_short_press
|
type: remote_button_short_press
|
||||||
subtype: turn_on
|
subtype: turn_on
|
||||||
action:
|
action:
|
||||||
- choose:
|
- service: script.office_lights_toggle
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: light.office
|
|
||||||
state: 'on'
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.office
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: light.office
|
|
||||||
state: 'off'
|
|
||||||
sequence:
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
state: 'on'
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.office
|
|
||||||
data:
|
|
||||||
brightness_pct: 100
|
|
||||||
kelvin: 2000
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
state: 'off'
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.office
|
|
||||||
data:
|
|
||||||
brightness_pct: 100
|
|
||||||
kelvin: 3200
|
|
||||||
mode: single
|
|
||||||
|
|
||||||
- id: button-office-off
|
- id: office-button-wol
|
||||||
alias: '[Office] Button WoL'
|
alias: '[Office] Button WoL'
|
||||||
trigger:
|
trigger:
|
||||||
- device_id: 5b972523e427721ec88e095994f7cc16
|
- device_id: 5b972523e427721ec88e095994f7cc16
|
||||||
|
@ -10,7 +10,13 @@
|
|||||||
entity_id: binary_sensor.kitchen_tabletop_motion_detection
|
entity_id: binary_sensor.kitchen_tabletop_motion_detection
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
- service: script.kitchen_lights_on
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: numeric_state
|
||||||
|
entity_id: sensor.office_illuminance
|
||||||
|
below: '150'
|
||||||
|
sequence:
|
||||||
|
- service: script.kitchen_lights_on
|
||||||
|
|
||||||
- id: kitchen-lights-off
|
- id: kitchen-lights-off
|
||||||
alias: '[Kitchen] Lights Off'
|
alias: '[Kitchen] Lights Off'
|
||||||
|
47
scripts/95.lights-office.yaml
Normal file
47
scripts/95.lights-office.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
office_lights_toggle:
|
||||||
|
alias: '[Office] Lights toggle'
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: light.office
|
||||||
|
state: 'on'
|
||||||
|
sequence:
|
||||||
|
- service: script.office_lights_off
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: light.office
|
||||||
|
state: 'off'
|
||||||
|
sequence:
|
||||||
|
- service: script.office_lights_on
|
||||||
|
|
||||||
|
office_lights_off:
|
||||||
|
alias: '[Office] Lights off'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.office
|
||||||
|
|
||||||
|
office_lights_on:
|
||||||
|
alias: '[Office] Lights on'
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
state: 'on'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.office
|
||||||
|
data:
|
||||||
|
brightness_pct: 100
|
||||||
|
kelvin: 2000
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
state: 'off'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.office
|
||||||
|
data:
|
||||||
|
brightness_pct: 100
|
||||||
|
kelvin: 3200
|
Loading…
Reference in New Issue
Block a user