Mon problème
Je rencontre un erreur dans mes logs sur 2 sensor qui indique la temperature max du jour et minimum.
Si une personne connait la solution je suis preneur
Template warning: 'timestamp_custom' got invalid input '2022-01-23 00:00:00+01:00' when rendering template '{% set format = '%Y-%m-%dT%H:%M:%S+00:00' %} {% set start = now().replace(hour=0,minute=0,second=0, microsecond=0) %} {% set end = (start + timedelta(days=1)) | timestamp_custom(format, false) %} {% set start = start | timestamp_custom(format, false) %} {{ state_attr('weather.xxxx', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='temperature') | list | max }}' but no default was specified. Currently 'timestamp_custom' will return '2022-01-23 00:00:00+01:00', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'timestamp_custom' got invalid input '2022-01-22 00:00:00+01:00' when rendering template '{% set format = '%Y-%m-%dT%H:%M:%S+00:00' %} {% set start = now().replace(hour=0,minute=0,second=0, microsecond=0) %} {% set end = (start + timedelta(days=1)) | timestamp_custom(format, false) %} {% set start = start | timestamp_custom(format, false) %} {{ state_attr('weather.xxxxx', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='temperature') | list | max }}' but no default was specified. Currently 'timestamp_custom' will return '2022-01-22 00:00:00+01:00', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'timestamp_custom' got invalid input '2022-01-23 00:00:00+01:00' when rendering template '{% set format = '%Y-%m-%dT%H:%M:%S+00:00' %} {% set start = now().replace(hour=0,minute=0,second=0, microsecond=0) %} {% set end = (start + timedelta(days=1)) | timestamp_custom(format, false) %} {% set start = start | timestamp_custom(format, false) %} {{ state_attr('weather.xxxx', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='templow') | list | max }}' but no default was specified. Currently 'timestamp_custom' will return '2022-01-23 00:00:00+01:00', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'timestamp_custom' got invalid input '2022-01-22 00:00:00+01:00' when rendering template '{% set format = '%Y-%m-%dT%H:%M:%S+00:00' %} {% set start = now().replace(hour=0,minute=0,second=0, microsecond=0) %} {% set end = (start + timedelta(days=1)) | timestamp_custom(format, false) %} {% set start = start | timestamp_custom(format, false) %} {{ state_attr('weather.xxxx', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='templow') | list | max }}' but no default was specified. Currently 'timestamp_custom' will return '2022-01-22 00:00:00+01:00', however this template will fail to render in Home Assistant core 2022.1
#############################################################
### TEMPERATURE MIN/MAX DU JOUR ##
#############################################################
- platform: template
sensors:
day_max_temp:
friendly_name: "Max.temperature"
unit_of_measurement: "°C"
#entity_id: weather.xxxx //deprecated
value_template: >
{% set format = '%Y-%m-%dT%H:%M:%S+00:00' %}
{% set start = now().replace(hour=0,minute=0,second=0, microsecond=0) %}
{% set end = (start + timedelta(days=1)) | timestamp_custom(format, false) %}
{% set start = start | timestamp_custom(format, false) %}
{{ state_attr('weather.xxxx', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='temperature') | list | max }}
- platform: template
sensors:
day_min_temp:
friendly_name: "Min.temperature"
unit_of_measurement: "°C"
#entity_id: weather.xxxx //deprecated
value_template: >
{% set format = '%Y-%m-%dT%H:%M:%S+00:00' %}
{% set start = now().replace(hour=0,minute=0,second=0, microsecond=0) %}
{% set end = (start + timedelta(days=1)) | timestamp_custom(format, false) %}
{% set start = start | timestamp_custom(format, false) %}
{{ state_attr('weather.xxxxx', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='templow') | list | max }}
Ma configuration
Texte à remplacer par votre configuration
Comment récupérer ma configuration :
Dans votre HA, Menu latéral
Configuration
> Paramètres
> Info
> bouton copier > Pour Github
