Page 1 of 1

%c_m2dhm%(%uptime%) does nothing

Posted: 05 Aug 2019, 19:18
by sander815
i want to display uptime in days hours and seconds, but when adding this
%c_m2dhm%(%uptime%)
as formula, it still shows amount of minutes, notyhing changes

Re: %c_m2dhm%(%uptime%) does nothing

Posted: 05 Aug 2019, 19:26
by grovkillen
Sorry, you cannot use that in formula, only in rules.

Re: %c_m2dhm%(%uptime%) does nothing

Posted: 06 Aug 2019, 15:17
by waspie
grovkillen wrote:
05 Aug 2019, 19:26
Sorry, you cannot use that in formula, only in rules.
could he use it in a rule and write the value to a dummy item and run the formula on the dummy?

Re: %c_m2dhm%(%uptime%) does nothing

Posted: 06 Aug 2019, 19:45
by grovkillen
Yes but the formula would be done by the rules in that case, not formula.

Re: %c_m2dhm%(%uptime%) does nothing

Posted: 06 Aug 2019, 20:06
by ThomasB
i want to display uptime in days hours and seconds...
As suggested you can use rules to calculate/store the three %uptime% derived values to dummy variables. Then use the three dummy values to create the dd:hh:mm message for your display. Or skip the dummy's and directly send the calculated values.

If you need additional advice then please tell us where you want to display the values. Include the details to any plugins and controllers you are using.

- Thomas

Re: %c_m2dhm%(%uptime%) does nothing

Posted: 06 Aug 2019, 23:43
by Domosapiens
For those who are also lost with %c_m2dhm%
See:
https://www.letscontrolit.com/wiki/inde ... asyFormula end of page.

:o :roll:

Re: %c_m2dhm%(%uptime%) does nothing

Posted: 06 Aug 2019, 23:56
by ThomasB
Another source for standard conversion formulas (and other useful things) is from ESPEasy's Tools menu: Tools->SystemVariables
http://IP_ADDR/sysvars

- Thomas