Hello,
I’ve got a ‘OpenWeatherMap Forecast Precipitation’ sensor. It works fine, however sometimes, when there is no precipitation at all, it shows the state “unavailable” or “unknown”. I count the sum for next 12 hours by the “statistics” template from this sensor. I use it to check if should I water the garden if it exceeds the threshold.
But how can I change “unavailable” or “unknown” state for simple 0.0 value? I tried value_template, but it does not work in statistics template.
sensor:
- platform: statistics
name: "Precipitation in next 12 hours"
entity_id: sensor.openweathermap_forecast_precipitation
state_characteristic: sum
max_age:
hours: 12