|
|
@@ -7,7 +7,7 @@ homeassistant:
|
|
|
elevation: 10
|
|
|
unit_system: metric
|
|
|
time_zone: Europe/Dublin
|
|
|
- customize: !include customize.yaml
|
|
|
+ # customize: !include customize.yaml
|
|
|
|
|
|
# Configure a default setup of Home Assistant (frontend, api, etc)
|
|
|
default_config:
|
|
|
@@ -90,63 +90,63 @@ script:
|
|
|
entity_id: switch.wenzhou_tkb_1
|
|
|
|
|
|
automation:
|
|
|
- - alias: Log motion detection status
|
|
|
- initial_state: false
|
|
|
- trigger:
|
|
|
- platform: event
|
|
|
- event_type: time_changed
|
|
|
- condition:
|
|
|
- condition: template
|
|
|
- value_template: "{{ now().second % 10 == 0 }}"
|
|
|
- action:
|
|
|
- - service: system_log.write
|
|
|
- data_template:
|
|
|
- message: "sensor.aeotec_multisensor_6_burglar state: {{ states('sensor.aeotec_multisensor_6_burglar') }}"
|
|
|
+ # - alias: Log motion detection status
|
|
|
+ # initial_state: false
|
|
|
+ # trigger:
|
|
|
+ # platform: event
|
|
|
+ # event_type: time_changed
|
|
|
+ # condition:
|
|
|
+ # condition: template
|
|
|
+ # value_template: "{{ now().second % 10 == 0 }}"
|
|
|
+ # action:
|
|
|
+ # - service: system_log.write
|
|
|
+ # data_template:
|
|
|
+ # message: "sensor.aeotec_multisensor_6_burglar state: {{ states('sensor.aeotec_multisensor_6_burglar') }}"
|
|
|
|
|
|
- - alias: Turn on lights (motion)
|
|
|
- initial_state: true
|
|
|
- trigger:
|
|
|
- - platform: state
|
|
|
- entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
- from: "0"
|
|
|
- to: "8"
|
|
|
- - platform: state
|
|
|
- entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
- from: "3"
|
|
|
- to: "8"
|
|
|
- condition:
|
|
|
- - condition: numeric_state
|
|
|
- entity_id: sensor.solar_angle
|
|
|
- below: 0
|
|
|
- action:
|
|
|
- - service: script.lights_on
|
|
|
+ # - alias: Turn on lights (motion)
|
|
|
+ # initial_state: true
|
|
|
+ # trigger:
|
|
|
+ # - platform: state
|
|
|
+ # entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
+ # from: "0"
|
|
|
+ # to: "8"
|
|
|
+ # - platform: state
|
|
|
+ # entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
+ # from: "3"
|
|
|
+ # to: "8"
|
|
|
+ # condition:
|
|
|
+ # - condition: numeric_state
|
|
|
+ # entity_id: sensor.solar_angle
|
|
|
+ # below: 0
|
|
|
+ # action:
|
|
|
+ # - service: script.lights_on
|
|
|
|
|
|
- - alias: Turn off lights (no motion)
|
|
|
- initial_state: true
|
|
|
- trigger:
|
|
|
- - platform: state
|
|
|
- entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
- from: "8"
|
|
|
- to: "0"
|
|
|
- for:
|
|
|
- minutes: 1
|
|
|
- - platform: state
|
|
|
- entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
- from: "3"
|
|
|
- to: "0"
|
|
|
- for:
|
|
|
- minutes: 1
|
|
|
- condition:
|
|
|
- - condition: time
|
|
|
- after: '23:30:00'
|
|
|
- before: '19:00:00'
|
|
|
- action:
|
|
|
- - service: script.lights_off
|
|
|
+ # - alias: Turn off lights (no motion)
|
|
|
+ # initial_state: true
|
|
|
+ # trigger:
|
|
|
+ # - platform: state
|
|
|
+ # entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
+ # from: "8"
|
|
|
+ # to: "0"
|
|
|
+ # for:
|
|
|
+ # minutes: 1
|
|
|
+ # - platform: state
|
|
|
+ # entity_id: sensor.aeotec_multisensor_6_burglar
|
|
|
+ # from: "3"
|
|
|
+ # to: "0"
|
|
|
+ # for:
|
|
|
+ # minutes: 1
|
|
|
+ # condition:
|
|
|
+ # - condition: time
|
|
|
+ # after: '23:30:00'
|
|
|
+ # before: '19:00:00'
|
|
|
+ # action:
|
|
|
+ # - service: script.lights_off
|
|
|
|
|
|
- alias: Turn off lights (midnight timer)
|
|
|
trigger:
|
|
|
platform: time_pattern
|
|
|
- hours: '23'
|
|
|
+ hours: '00'
|
|
|
minutes: '30'
|
|
|
action:
|
|
|
- service: script.lights_off
|