Ver Fonte

conf update

Martin há 4 anos atrás
pai
commit
b52fa1b2b0
1 ficheiros alterados com 31 adições e 20 exclusões
  1. 31 20
      hass/confs/configuration.yaml

+ 31 - 20
hass/confs/configuration.yaml

@@ -70,25 +70,16 @@ sensor:
 #     enable_websocket: false
 
 script:
-  lights_off:
+
+  lights_on_partial:
     sequence:
-      # - service: system_log.write
-      #   data:
-      #     message: "***** Turning off the lights"
-      - service: homeassistant.turn_off
+      - service: homeassistant.turn_on
         entity_id: switch.wenzhou_tkb_0
-      - service: homeassistant.turn_off
+      - service: homeassistant.turn_on
         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:
     sequence:
-      # - service: system_log.write
-      #   data:
-      #     message: "***** Turning on the lights"
       - service: homeassistant.turn_on
         entity_id: switch.wenzhou_tkb_0
       - service: homeassistant.turn_on
@@ -98,21 +89,42 @@ script:
       - service: homeassistant.turn_on
         entity_id: switch.wenzhou_tkb_3
 
-  lights_on_partial:
+  lights_off:
     sequence:
       # - service: system_log.write
       #   data:
-      #     message: "***** Turning on the lights"
-      - service: homeassistant.turn_on
+      #     message: "***** Turning off the lights"
+      - service: homeassistant.turn_off
         entity_id: switch.wenzhou_tkb_0
-      - service: homeassistant.turn_on
+      - service: homeassistant.turn_off
         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_off_partial:
+    sequence:
+      - service: homeassistant.turn_off
+        entity_id: switch.wenzhou_tkb_0
+      - service: homeassistant.turn_off
+        entity_id: switch.wenzhou_tkb_1
+      - service: homeassistant.turn_off
+        entity_id: switch.wenzhou_tkb_3
 
 automation:
+  # - alias: Turn off lights (time, partial)
+  #   trigger:
+  #     platform: time_pattern
+  #     hours: '01'
+  #     minutes: '00'
+  #   action:
+  #     - service: script.lights_off_partial
+
   - alias: Turn off lights (time)
     trigger:
       platform: time_pattern
-      hours: '00'
+      hours: '23'
       minutes: '30'
     action:
       - service: script.lights_off
@@ -182,12 +194,11 @@ automation:
           minutes: 3
     condition:
       - condition: time
-        after: '00:30:00'
+        after: '23:30:00'
         before: '08:00:00'
     action:
       - service: script.lights_off
 
-
   # - alias: water immersion (weekdays)
   #   initial_state: false
   #   trigger: