Strange that it would work for you. I checked in the My Devices area in the IDE as well as with the Classic app (dashboard and device) and new app and they all read as integers (21 or 22 degree C). The only place a decimal is shown (and always was) was in the new app in the history section, but it is always “.0” for all of my temp sensors using both the ST Device Handler and this custom one.
I’ve added the code and will check the reports in live logging. Looking at the live logging events today the only thing that looks different on the sensor I’m testing is the tilt sensors is getting routinely activated and I’m not sure why.
Interesting. Sensor temperature has been changing, the Apps show the change as does the Simple Event Logger I’m using to a Google Sheet. However in the IDE/Live Logging shows nothing, even after I refreshed it. Is the “description” a unformatted string that has the raw sensor data? Wondering if I should just copy the code into a new Handler and assign that one.
Well that worked. Created a new event handler with the same code, published it, then nothing. I needed to refresh it in the Classic app and then decimals now appear in both the new and classic app.
Interesting in the Live Log two decimals appear however one decimal in all of the other screens. The description string though only showed once when I refreshed it. I would have thought that it would show in the live log each time the temp changes.
Thanks alot.
Now I get to see how precise versus accurate these sensors are. I care more about precision and I read somewhere that a lot of the 1 degree C accurate sensors are 0.1 degree precise which would be great.
Hmmm…now I can’t seem to modify Automations that have this device now. Argh…deleting the Automations and recreating them worked. Perhaps switching Device Handlers creates problems for Automations.