aex351 / home-assistant-neerslag-card

Display Buienalarm and/or Buienradar data in a graph for Home Assistant.
30 stars 3 forks source link

Warning for undefined variable in template #13

Closed dynasticorpheus closed 3 years ago

dynasticorpheus commented 3 years ago

As per 2021.4 release a warning is shown which can be solved by setting default value for template sensor as per below.

from: value_template: 'last_changed: {{states.sensor.neerslag_buienalarm_regen_data.last_changed}}'

to: value_template: 'last_changed: {{states.sensor.neerslag_buienalarm_regen_data.last_changed | default(now())}}'

aex351 commented 3 years ago

Thanks @dynasticorpheus. I have updated the readme file and created a new release.