for a freezer I now started to implement the application and I´m using the level control of espeasy. To make it work for a freezer, I converted the negative temperature by formula to positive. But I also use a smal TM1637 7 segment display to visualize the temp locally at the freezer. Therefor I used a rule.
Code: Select all
On TempGefrierschrank1#Temperature do
Let 1,[TempGefrierschrank1#Temperature]
Let 2,-1*[var#1] // convert pos to negative
7dn,[var#2]
Publish %sysname%/TempGefrierschrank1/Temperature2,[var#2]
EndOn
[TempGefrierschrank1#Temperature] is float and has 2 descimals defined from the temperature device configuration.
[var#1] is also float %v1% would be INT, right?
So [var#2] is also float but no decimals are shown by the display.
Log says:
Code: Select all
Copied: "659893: DS : Temperature: -17.06 (28-ff-44-db-64-15-2-bf)
659905: EVENT: TempGefrierschrank1#Temperature=17.06
659934: ACT : Let 1,17.06
659938: ACT : Let 2,-1*17.06
659941: ACT : 7dn,-17.06
659944: 7DGT : Show Number=-17
659953: ACT : Publish ESP_Gefrierschrank/TempGefrierschrank1/Temperature2,-17.06
Is it possible to show 1 decimal?
Thx