ESPEasy Values Decimals

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hotspot_2
Normal user
Posts: 26
Joined: 09 Dec 2022, 21:43

ESPEasy Values Decimals

#1 Post by hotspot_2 » 26 Dec 2022, 16:43

Hello,

at the moment i get some values of an ESP8266 D1 Mini with one decimal (e.g. 21.1, 23.4, ...). But when the decimal is "0" the value is transmitted via mqtt without a decimal (0).

Is there a way to this with ESPEasy or must i script this with JS oder Blockly in IOBroker?

Thanks for your help!

User avatar
Ath
Normal user
Posts: 3482
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy Values Decimals

#2 Post by Ath » 26 Dec 2022, 19:28

Isn't that for the 'other end' to determine how to present the data? MQTT is a transport mechanism for data, not for presentation, so it shouldn't matter if ESPEasy sends it with or without decimals.
/Ton (PayPal.me)

hotspot_2
Normal user
Posts: 26
Joined: 09 Dec 2022, 21:43

Re: ESPEasy Values Decimals

#3 Post by hotspot_2 » 26 Dec 2022, 20:02

Ok. That makes sense!

I will solve this issue in iobroker.

Thanks a lot.

TD-er
Core team member
Posts: 8738
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasy Values Decimals

#4 Post by TD-er » 27 Dec 2022, 00:26

What data source is used in ESPEasy?
Is it somewhere where formatting can be used, like this: https://espeasy.readthedocs.io/en/lates ... red-values ?
If the data is sent by a task, then it should obey the formatting set in that task (nr. of decimals)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 28 guests