|
@@ -72,19 +72,37 @@ sensor:
|
|
|
script:
|
|
script:
|
|
|
lights_off:
|
|
lights_off:
|
|
|
sequence:
|
|
sequence:
|
|
|
- - service: system_log.write
|
|
|
|
|
- data:
|
|
|
|
|
- message: "***** Turning off the lights"
|
|
|
|
|
|
|
+ # - service: system_log.write
|
|
|
|
|
+ # data:
|
|
|
|
|
+ # message: "***** Turning off the lights"
|
|
|
- service: homeassistant.turn_off
|
|
- service: homeassistant.turn_off
|
|
|
entity_id: switch.wenzhou_tkb_0
|
|
entity_id: switch.wenzhou_tkb_0
|
|
|
- service: homeassistant.turn_off
|
|
- service: homeassistant.turn_off
|
|
|
entity_id: switch.wenzhou_tkb_1
|
|
entity_id: switch.wenzhou_tkb_1
|
|
|
|
|
+ - service: homeassistant.turn_off
|
|
|
|
|
+ entity_id: switch.wenzhou_tkb_2
|
|
|
|
|
+ - service: homeassistant.turn_off
|
|
|
|
|
+ entity_id: switch.wenzhou_tkb_3
|
|
|
|
|
|
|
|
lights_on:
|
|
lights_on:
|
|
|
sequence:
|
|
sequence:
|
|
|
- - service: system_log.write
|
|
|
|
|
- data:
|
|
|
|
|
- message: "***** Turning on the lights"
|
|
|
|
|
|
|
+ # - service: system_log.write
|
|
|
|
|
+ # data:
|
|
|
|
|
+ # message: "***** Turning on the lights"
|
|
|
|
|
+ - service: homeassistant.turn_on
|
|
|
|
|
+ entity_id: switch.wenzhou_tkb_0
|
|
|
|
|
+ - service: homeassistant.turn_on
|
|
|
|
|
+ entity_id: switch.wenzhou_tkb_1
|
|
|
|
|
+ - service: homeassistant.turn_on
|
|
|
|
|
+ entity_id: switch.wenzhou_tkb_2
|
|
|
|
|
+ - service: homeassistant.turn_on
|
|
|
|
|
+ entity_id: switch.wenzhou_tkb_3
|
|
|
|
|
+
|
|
|
|
|
+ lights_on_partial:
|
|
|
|
|
+ sequence:
|
|
|
|
|
+ # - service: system_log.write
|
|
|
|
|
+ # data:
|
|
|
|
|
+ # message: "***** Turning on the lights"
|
|
|
- service: homeassistant.turn_on
|
|
- service: homeassistant.turn_on
|
|
|
entity_id: switch.wenzhou_tkb_0
|
|
entity_id: switch.wenzhou_tkb_0
|
|
|
- service: homeassistant.turn_on
|
|
- service: homeassistant.turn_on
|
|
@@ -99,11 +117,20 @@ automation:
|
|
|
action:
|
|
action:
|
|
|
- service: script.lights_off
|
|
- service: script.lights_off
|
|
|
|
|
|
|
|
- - alias: Turn on lights (time)
|
|
|
|
|
|
|
+ - alias: Turn on lights (solar)
|
|
|
|
|
+ # 30 min past sunset
|
|
|
trigger:
|
|
trigger:
|
|
|
- platform: time_pattern
|
|
|
|
|
- hours: '16'
|
|
|
|
|
- minutes: '00'
|
|
|
|
|
|
|
+ platform: sun
|
|
|
|
|
+ event: sunset
|
|
|
|
|
+ offset: "00:30:00"
|
|
|
|
|
+ # trigger:
|
|
|
|
|
+ # platform: time_pattern
|
|
|
|
|
+ # hours: '16'
|
|
|
|
|
+ # minutes: '00'
|
|
|
|
|
+ # condition:
|
|
|
|
|
+ # - condition: numeric_state
|
|
|
|
|
+ # entity_id: sensor.solar_angle
|
|
|
|
|
+ # below: 0
|
|
|
action:
|
|
action:
|
|
|
- service: script.lights_on
|
|
- service: script.lights_on
|
|
|
|
|
|
|
@@ -136,7 +163,7 @@ automation:
|
|
|
entity_id: sensor.solar_angle
|
|
entity_id: sensor.solar_angle
|
|
|
below: 0
|
|
below: 0
|
|
|
action:
|
|
action:
|
|
|
- - service: script.lights_on
|
|
|
|
|
|
|
+ - service: script.lights_on_partial
|
|
|
|
|
|
|
|
- alias: Turn off lights (no motion)
|
|
- alias: Turn off lights (no motion)
|
|
|
initial_state: true
|
|
initial_state: true
|
|
@@ -146,17 +173,17 @@ automation:
|
|
|
from: "8"
|
|
from: "8"
|
|
|
to: "0"
|
|
to: "0"
|
|
|
for:
|
|
for:
|
|
|
- minutes: 1
|
|
|
|
|
|
|
+ minutes: 3
|
|
|
- platform: state
|
|
- platform: state
|
|
|
entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
|
|
entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
|
|
|
from: "3"
|
|
from: "3"
|
|
|
to: "0"
|
|
to: "0"
|
|
|
for:
|
|
for:
|
|
|
- minutes: 1
|
|
|
|
|
|
|
+ minutes: 3
|
|
|
condition:
|
|
condition:
|
|
|
- condition: time
|
|
- condition: time
|
|
|
after: '00:30:00'
|
|
after: '00:30:00'
|
|
|
- before: '19:00:00'
|
|
|
|
|
|
|
+ before: '08:00:00'
|
|
|
action:
|
|
action:
|
|
|
- service: script.lights_off
|
|
- service: script.lights_off
|
|
|
|
|
|