blueprints/automation/wd-close-weather-notification.yaml aktualisiert

This commit is contained in:
2025-08-30 03:48:24 +00:00
parent c7f0ebfc28
commit 15bac78167

View File

@@ -12,15 +12,11 @@ blueprint:
multiple: true multiple: true
temperature_sensor: temperature_sensor:
name: Temperature Sensor name: Temperature Sensor
description: Select a temperature sensor or weather entity description: Select a temperature sensor
selector: selector:
entity: entity:
filter: domain: sensor
domain: device_class: temperature
- sensor
- weather
device_class:
- temperature
weather_entity: weather_entity:
name: Weather Forecast Entity name: Weather Forecast Entity
description: Select a weather forecast entity description: Select a weather forecast entity
@@ -66,12 +62,7 @@ trigger:
action: action:
- variables: - variables:
current_temp: > current_temp: "{{ states(!input.temperature_sensor) | map(attribute='state') | map('float') | min }}"
{% if is_state_attr(!input.temperature_sensor, 'temperature', none) %}
{{ state_attr(!input.temperature_sensor, 'temperature') }}
{% else %}
{{ states(!input.temperature_sensor) | map(attribute='state') | map('float') | min }}
{% endif %}
current_condition: > current_condition: >
{% set states_list = !input.bad_weather_states.split(',') | map('trim') %} {% set states_list = !input.bad_weather_states.split(',') | map('trim') %}
{% if states(!input.weather_entity) | string in states_list %} {% if states(!input.weather_entity) | string in states_list %}