Hi!
I'm using this LUA-script for updating a textfile with temperature from one of my temperaturedevices.
Ii is working but the temperaturevalue has to many decimales, like 2.2999999523163
Is it possible to trim or round the value to maybe 1 decimales, like 2.3
My script:
commandArray = {}
if ...
Search found 1 match
Search found 1 match
• Page 1 of 1
- by CalderX
- Saturday 02 April 2016 18:33
- Forum: LUA
- Topic: Trim variable
- Replies: 1
- Views: 515
Search found 1 match
• Page 1 of 1
Jump to
- General
- ↳ News & Updates
- ↳ General Discussion
- ↳ Bugs and Problems
- ↳ Other questions and discussions
- ↳ Suggestions
- Domoticz
- ↳ Installation, Compiling, Permissions, Security and Starting
- ↳ Cameras
- ↳ Switches and Scenes
- ↳ Utility
- ↳ Temperature and Weather
- ↳ Heating/cooling
- ↳ OpenTherm gateway
- ↳ Evohome
- ↳ Third party and supplementary tools
- ↳ Android
- ↳ iOS
- ↳ Windows
- ↳ Kodi (XBMC)
- ↳ Domoboard
- ↳ Dashticz
- ↳ Bugs
- ↳ Feature requests
- ↳ How-tos
- ↳ Node-RED
- ↳ Design, usability and languages
- ↳ Language / Translation
- Scripting & automation
- ↳ dzVents
- ↳ Bugs
- ↳ Examples & Solutions
- ↳ LUA
- ↳ Bash / PowerShell / Batch etc.
- ↳ Blockly
- ↳ Python
- ↳ PHP and all others
- Hardware and Protocols
- ↳ MQTT Auto Discovery
- ↳ Z-Wave
- ↳ Device information
- ↳ Zigbee
- ↳ Speech & Voice Systems
- ↳ 433 & 868 transceiver
- ↳ RFLink Transceiver
- ↳ Rfxcom Transceiver
- ↳ DIY Hardware and Protocols
- ↳ ESP8266
- ↳ PiFace
- ↳ Raspberry Pi GPIO ( WiringPi )
- ↳ MySensors
- ↳ 1-wire
- ↳ Others
- Community
- ↳ Sales, Deals and Bargains..
- ↳ Deals & bargains
- ↳ Forum feedback
- ↳ Show your projects
- ↳ Projects on other sites