Преглед изворни кода

Moved automations to ext lights file.

Thomas Chef пре 4 година
родитељ
комит
898fc58ddc
2 измењених фајлова са 64 додато и 60 уклоњено
  1. 0 59
      automations.yaml
  2. 64 1
      packages/ext_lights.yaml

+ 0 - 59
automations.yaml

@@ -1,59 +0,0 @@
-- id: '1604224258912'
-  alias: Exterior lights ON in evening
-  description: In the evening, turn the lights ON
-  trigger:
-  - platform: numeric_state
-    entity_id: sensor.lux_outside_the_garage
-    below: '100'
-  condition:
-  - condition: state
-    entity_id: input_boolean.ext_light_on_done
-    state: 'off'
-  action:
-  - service: light.turn_on
-    data: {}
-    entity_id: light.exterior_lights_repeater
-  - service: light.turn_on
-    data: {}
-    entity_id: light.exterior_lights
-  - service: input_boolean.turn_on
-    data: {}
-    entity_id: input_boolean.ext_light_on_done
-  mode: single
-- id: '1604250273403'
-  alias: Exterior lights OFF in morning
-  description: ''
-  trigger:
-  - platform: numeric_state
-    entity_id: sensor.lux_outside_the_garage
-    above: '50'
-  condition:
-  - condition: state
-    entity_id: input_boolean.ext_light_off_done
-    state: 'off'
-  action:
-  - service: light.turn_off
-    data: {}
-    entity_id: light.exterior_lights_repeater
-  - service: light.turn_off
-    data: {}
-    entity_id: light.exterior_lights
-  - service: input_boolean.turn_on
-    data: {}
-    entity_id: input_boolean.ext_light_off_done
-  mode: single
-- id: '1604426412714'
-  alias: Turn boolean switches off at midnight
-  description: ''
-  trigger:
-  - platform: time
-    at: 00:05:00
-  condition: []
-  action:
-  - service: input_boolean.turn_off
-    data: {}
-    entity_id: input_boolean.ext_light_off_done
-  - service: input_boolean.turn_off
-    data: {}
-    entity_id: input_boolean.ext_light_on_done
-  mode: single

+ 64 - 1
packages/ext_lights.yaml

@@ -20,4 +20,67 @@ input_boolean:
     icon: mdi:car
   ext_light_off_done:
     name: Bool switch, Ext light turned OFF
-    icon: mdi:car
+    icon: mdi:car
+
+automation:
+  - alias: Exterior lights ON in evening
+    description: In the evening, turn the lights ON
+    trigger:
+    - platform: numeric_state
+      entity_id: sensor.lux_outside_the_garage
+      below: '100'
+    condition:
+    - condition: state
+      entity_id: input_boolean.ext_light_on_done
+      state: 'off'
+    action:
+    - service: light.turn_on
+      data: {}
+      entity_id: light.exterior_lights_repeater
+    - service: light.turn_on
+      data: {}
+      entity_id: light.exterior_lights
+    - service: input_boolean.turn_on
+      data: {}
+      entity_id: input_boolean.ext_light_on_done
+    mode: single
+
+
+  - alias: Exterior lights OFF in morning
+    description: ''
+    trigger:
+    - platform: numeric_state
+      entity_id: sensor.lux_outside_the_garage
+      above: '50'
+    condition:
+    - condition: state
+      entity_id: input_boolean.ext_light_off_done
+      state: 'off'
+    action:
+    - service: light.turn_off
+      data: {}
+      entity_id: light.exterior_lights_repeater
+    - service: light.turn_off
+      data: {}
+      entity_id: light.exterior_lights
+    - service: input_boolean.turn_on
+      data: {}
+      entity_id: input_boolean.ext_light_off_done
+    mode: single
+
+
+
+  - alias: Turn boolean switches off at midnight
+    description: ''
+    trigger:
+    - platform: time
+      at: 00:05:00
+    condition: []
+    action:
+    - service: input_boolean.turn_off
+      data: {}
+      entity_id: input_boolean.ext_light_off_done
+    - service: input_boolean.turn_off
+      data: {}
+      entity_id: input_boolean.ext_light_on_done
+    mode: single