zkoušel jsem pomocí chat-gp vygenerovat kod ale bohužel nejde, dává to hodnoty N/A
Kód: Vybrat vše
- sensor:
- name: 'nejnizsi_teplota_venku_5h'
unit_of_measurement: '°C'
device_class: temperature
state: >
{% set threshold = now() - timedelta(hours=5) %}
{% set filtered_values = states.sensor.gw1000a_v1_7_5_outdoor_temperature.attributes.values() | select('float') | select('>', 0) | select('>=', threshold.timestamp()) | list %}
{% if filtered_values %}
{{ '%.1f' | format(filtered_values | min) }}
{% else %}
N/A
{% endif %}
díky