Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'decimals'.
Hi all, I'm trying to code a VD which allows me to read out temperature, humidity levels and weather type. Basically I have all working well now, but for the humidity and temperature I get the full string as output: Humidity: 81.000000000000000 Temperature: 6.0000000000000000 .. instead of getting the output with 0 decimals plus the special characters. I'd like to achieve two things: 1. limit the output to 0 decimals 2. add the percentage- and degree centigrade character behind the output I've searched the web and found there are multiple ways of doing this, but I can't get it work due to lack of knowledge on my side. Anyone who can help me out, please? To test you can use the below code to read out the HC values, which are being taken from the Yahoo Weather service: fibaro:getValue(3,"Temperature") and fibaro:getValue(3,"Humidity") Thanks and best regards, Mark