From: Giorgio Ravera Date: Tue, 23 May 2023 22:51:40 +0000 (+0200) Subject: Other yaml improvements X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=aa098e635dbb75f699be108cf88f06322305fa1e;p=homeassistant.git Other yaml improvements --- diff --git a/automations/nfc.yaml b/automations/nfc.yaml index 5ac92908..94661e32 100644 --- a/automations/nfc.yaml +++ b/automations/nfc.yaml @@ -26,35 +26,35 @@ 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 diff --git a/automations/night.yaml b/automations/night.yaml index 7c0fb121..d59b6923 100644 --- a/automations/night.yaml +++ b/automations/night.yaml @@ -12,9 +12,6 @@ to: 'on' condition: [] -# condition: state -# entity_id: input_boolean.home_mode_away -# state: 'off' action: - service: cover.set_cover_position diff --git a/packages/away_mode/away_mode_climate.yaml b/packages/away_mode/away_mode_climate.yaml index 048ff03a..bf503d13 100644 --- a/packages/away_mode/away_mode_climate.yaml +++ b/packages/away_mode/away_mode_climate.yaml @@ -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: diff --git a/packages/netatmo/netatmo_away.yaml b/packages/netatmo/netatmo_away.yaml index 131cca63..ed017483 100644 --- a/packages/netatmo/netatmo_away.yaml +++ b/packages/netatmo/netatmo_away.yaml @@ -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: