Hi
just thought i would share my learning today with forecast.solar down - and see if someone has a better way to deal with it.
I learned that while I thought I had created robust solution(s) in templates/jinja by using | default () it does not work as I had expected, like today with forecast.solar returns ‘unavailable’ and down stream sensors = ‘unknown’ … I have had to explicitly define these cases better, what I have done is, eg
whereas
sensor is your sensor or whatever
default = default value, maybe 0? depends on your template
{{ set variable = default_for_variable if (sensor in ['unknown','unavailable'] or sensor2 in ['unknown','unavailable']) else formula_sensor_and_sensor2 }}
with that said, maybe there is a better way than this?