Przeglądaj źródła

enable motion-detection lights

Martin 5 lat temu
rodzic
commit
3c96c3c123
1 zmienionych plików z 54 dodań i 54 usunięć
  1. 54 54
      hass/confs/configuration.yaml

+ 54 - 54
hass/confs/configuration.yaml

@@ -107,58 +107,58 @@ automation:
     action:
       - service: script.lights_on
 
-  # - 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.aeon_labs_zw100_multisensor_6_burglar state: {{ states('sensor.aeon_labs_zw100_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.aeon_labs_zw100_multisensor_6_burglar
+        from: "0"
+        to: "8"
+      - platform: state
+        entity_id: sensor.aeon_labs_zw100_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.aeon_labs_zw100_multisensor_6_burglar
+        from: "8"
+        to: "0"
+        for:
+          minutes: 1
+      - platform: state
+        entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
+        from: "3"
+        to: "0"
+        for:
+          minutes: 1
+    condition:
+      - condition: time
+        after: '00:30:00'
+        before: '19:00:00'
+    action:
+      - service: script.lights_off
 
 
   # - alias: water immersion (weekdays)
@@ -183,11 +183,11 @@ automation:
   #   initial_state: true
   #   trigger:
   #     - platform: state
-  #       entity_id: sensor.aeotec_multisensor_6_burglar
+  #       entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
   #       from: "0"
   #       to: "8"
   #     - platform: state
-  #       entity_id: sensor.aeotec_multisensor_6_burglar
+  #       entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
   #       from: "3"
   #       to: "8"
   #   action:
@@ -202,13 +202,13 @@ automation:
   #   initial_state: true
   #   trigger:
   #     - platform: state
-  #       entity_id: sensor.aeotec_multisensor_6_burglar
+  #       entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
   #       from: "8"
   #       to: "0"
   #       for:
   #         minutes: 2
   #     - platform: state
-  #       entity_id: sensor.aeotec_multisensor_6_burglar
+  #       entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
   #       from: "3"
   #       to: "0"
   #       for: