I have a daily forecast sensor in which the current day’s high goes to unknown late in the day and it messes up my weather card. I was trying to figure out a way to listen when it goes to uknown and reset the value to the previous days high. I created a sensor to listen to the attribute value:
- sensor:
- name: todays_high
state: "{{states.sensor.my_weather_forecast_daily.attributes.forecast[0].temperature}}"
My thought was to create an automation to reset the attribute back to the previous high, but I couldn’t figure out a way to set an attribute within an automation. Is this possible or are there other method’s I could use to achieve the same effect?