]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Other yaml improvements
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Tue, 23 May 2023 22:51:40 +0000 (00:51 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Tue, 23 May 2023 22:51:40 +0000 (00:51 +0200)
automations/nfc.yaml
automations/night.yaml
packages/away_mode/away_mode_climate.yaml
packages/netatmo/netatmo_away.yaml

index 5ac92908b58d11eeec81205faf3eb5c7286517bf..94661e327e4c33987b6f8a3570fb506b8681cbe5 100644 (file)
         detected_device: "{{ trigger.event.data.device_id }}"
 
     - choose:
-      - conditions:
-          - "{{ detected_tag in allowed_tags }}"
-          - "{{ detected_device in allowed_devices }}"
-        sequence:
-        - service: script.notify_text
-          data_template:
-            title: "Home Assistant - Lettura NFC"
-            message: "Letto tag NFC {{ allowed_tags[detected_tag].name }} dal dispositivo {{ allowed_devices[detected_device].name }}."
-            enable_telegram: false
+        - conditions:
+            - "{{ detected_tag in allowed_tags }}"
+            - "{{ detected_device in allowed_devices }}"
+          sequence:
+            - service: script.notify_text
+              data_template:
+                title: "Home Assistant - Lettura NFC"
+                message: "Letto tag NFC {{ allowed_tags[detected_tag].name }} dal dispositivo {{ allowed_devices[detected_device].name }}."
+                enable_telegram: false
 
-      - conditions:
-          - "{{ detected_tag in allowed_tags }}"
-          - "{{ detected_device not in allowed_devices }}"
-        sequence:
-        - service: script.notify_text
-          data_template:
-            title: "Home Assistant - Lettura NFC"
-            message: "Letto tag NFC {{ allowed_tags[detected_tag].name }} da dispositivo non valido ({{ detected_device }})."
-            enable_telegram: false
+        - conditions:
+            - "{{ detected_tag in allowed_tags }}"
+            - "{{ detected_device not in allowed_devices }}"
+          sequence:
+            - service: script.notify_text
+              data_template:
+                title: "Home Assistant - Lettura NFC"
+                message: "Letto tag NFC {{ allowed_tags[detected_tag].name }} da dispositivo non valido ({{ detected_device }})."
+                enable_telegram: false
 
-      - conditions:
-          - "{{ detected_tag not in allowed_tags }}"
-          - "{{ detected_device in allowed_devices }}"
-        sequence:
-        - service: script.notify_text
-          data_template:
-            title: "Home Assistant - Lettura NFC"
-            message: "Letto tag NFC non riconosciuto ({{ detected_tag }}) dal dispositivo {{ allowed_devices[detected_device].name }}."
-            enable_telegram: false
+        - conditions:
+            - "{{ detected_tag not in allowed_tags }}"
+            - "{{ detected_device in allowed_devices }}"
+          sequence:
+            - service: script.notify_text
+              data_template:
+                title: "Home Assistant - Lettura NFC"
+                message: "Letto tag NFC non riconosciuto ({{ detected_tag }}) dal dispositivo {{ allowed_devices[detected_device].name }}."
+                enable_telegram: false
 
       default:
         - service: script.notify_text
index 7c0fb121dfdf2a01bf235fa15ff3b804eb13af27..d59b69234393814485656ef21096de40b274a404 100644 (file)
@@ -12,9 +12,6 @@
       to: 'on'
 
   condition: []
-#    condition: state
-#    entity_id: input_boolean.home_mode_away
-#    state: 'off'
 
   action:
     - service: cover.set_cover_position
index 048ff03a28c1ad6cce7ed7c6d8fdc88f5adac400..bf503d13831851db6ddd6b66a7d3c5db10635b7a 100644 (file)
@@ -33,12 +33,12 @@ automation:
           - conditions:
               - condition: and
                 conditions:
-                    - condition: state
-                      entity_id: input_boolean.home_mode_away
-                      state: "off"
-                    - condition: state
-                      entity_id: input_boolean.central_heating
-                      state: 'on'
+                  - condition: state
+                    entity_id: input_boolean.home_mode_away
+                    state: "off"
+                  - condition: state
+                    entity_id: input_boolean.central_heating
+                    state: 'on'
             sequence:
               - service: script.turn_on
                 data:
index 131cca6377ae0ca73f819e7c23c24a3d6c5bc2d7..ed0174834460363a585e1b12103da9f44b3d005d 100644 (file)
@@ -68,12 +68,12 @@ automation:
           - conditions:
               - condition: and
                 conditions:
-                    - condition: state
-                      entity_id: input_boolean.central_heating
-                      state: "on"
-                    - condition: state
-                      entity_id: input_boolean.home_mode_away
-                      state: 'off'
+                  - condition: state
+                    entity_id: input_boolean.central_heating
+                    state: "on"
+                  - condition: state
+                    entity_id: input_boolean.home_mode_away
+                    state: 'off'
             sequence:
               - service: script.turn_on
                 data: