Because the template you created isn’t designed to handle anything other than 1 and 0. At best, it will report 0 if the sensor’s value is unavailable (becausefloat(0) will report0 when given a non-numeric value). If that’s what you want it to do then it’s fine otherwise you’ll need to decide how it should handle unavailable.
It’s not working the way you think it is.
This is an incorrect usage of the states() function and will always report unknown.
This is always an education. The syntax of templates has ALWAYS been confusing for folks like me who are hack programmers at best. While I appreciate the full control, I despise the time it takes to figure th3 see out.
Perhaps there is an easier way to do such a simple thing?
I also need a way to actually set those values. There are 2 items I need to set in my pellet stove, eco and power level. Both are tuya datapoints, very much like speed control on a fan. Any insight there?
I have an inverter that is able to set value’s from Lovelace using mqtt. I suspect I’ll have to figure out if I can do the same thing here.