Hi, I get an unavailable state on the sensor below.
Is this because only “power_prod_high_daily” reports data and “power_prod_low_daily” is not (at this moment?)
is it simple to just change “and” in the availability line to “or”?
because what I’m trying to achieve: it must always give data back when both sensors report something but also if one of the two report something.
Your state template is adding the values of two sensors. Ideally, both sensors should have valid values and not just one or the other. In other words, the value of each sensor should not be unknown or unavailable.
However, if your choice is to accept at least one valid sensor value, instead of two, then you should logically OR the tests using has_value.
You’re getting that result because the template used by your example’s availability option is inappropriate for the purpose of determining if the sensors have valid values.
Your availability template was not testing for a valid value, it was performing a logical and on the states of the two sensors. Doing that will not achieve your goal.