(Unit of Measure, Time) - Seconds to M:S time to show on Page/OH-Card
Hello,
I am currently working on building a simple countdown timer and now I am looking at figuring out how to display the time on my page in an easy viewable manner. After finding the action timer (Action Timers) example I got basic countdown going now. I was able to calculate and show 30 second intervals by building a secondary rules/script to update a countdown number. By looking at what was done on the Washing machine status widget.
After hoping that defining the number as Number:Time to get to a formatting that I can find to work, it looks like per this post, Number Time UoM , this is not possible.
Number I am trying to convert in gui is shown in the image, I don’t know of another way to capture the full view of an item configurations. I do have the JS scripting installed under automation.
However, in the thread stream they mention using a script to convert the numbers to min and seconds. I have placed the script in the transform folder,but through the GUI, how do I call out that transform script?
I have tried replacing the %0.2f with “[JS(clockfmt.js):%s]” which lead to the system saying the JS was “Couldn’t transform value because transformation service of type ‘[JS’ is not available.”
Basic System:Openhab3.4 on Openhabian.
Any help or direction to further documentation on using scripting to change formatting would be greatly appreciated.
Thanks