Closed b3nn0 closed 2 months ago
indeed this is a bug: since there is no way to get the current value of demandcontrol, HA listens to the same topic where we send the command. It means you want to write 20%, we send the string 81.2
to heishamon via mqtt. HA receives 81.2
and tries to read it as an int :face_exhaling: . I'll fix this.
Thanks for reporting!
Unfortunately, I think it's still doing something wrong. The error is gone, but now there seems to be some rounding issue. E.g. when I set demand control to 20% in HA, it will automatically be set to 19% with the next update, which doesn't seem to be a valid value. Nothing dramatic, just slightly annoying.
Versions
Describe the bug
Hi, as of one of the more recent versions (I think 1.13.0?) I'm often seeing this error in my HA log:
Looks like there is some misinterpretation/invalid casting to int happening there.. Demand control is set to 20%. Setting it to other values yields similar errors. The value in the topic is written by this integration as a float (which is probably incorrect?)