Hello,
I am doing my university work and I am trying to put an image for each season of the year to the weather station sensor.
Could you help me?
This is the code I was testing but it gives errors on all sides
- platform: season
- platform: template
sensors:
entity_id: sensor.season
friendly_name: Estaciones
value_template: >
{% set phases = { 'spring':'Primavera', 'summert':'verano', 'autumn':'Otoño', 'winter':'Invierno'} %}
{% set phase = states('sensor.season') %}
{{ phases[phase] if phase in phases.keys() else 'nada' }}
entity_picture_template: >
{{ '/local/estaciones/{}.jpg'.format(states('sensor.season')) }}
Thanks!!!