Page 1 of 1
Battery temp in widget?
Posted: 15 Aug 2016 13:30
by Bender64
Hi it is possible to make this work? I try put text in widget "{battery_temperature}" / "{temp}" but not work.
Re: Battery temp in widget?
Posted: 16 Aug 2016 05:51
by kintrupf
Yes, this is possible.
First, you need a trigger or condition that actually supplies the battery temperature variable! So create a new flow with a Battery Level trigger. The variable battery_temperature only exist within the flow (and not the widget) and only when trigger or the condition Battery Level is used. Otherwise the returned value will always be empty!
Second, add a Script action to copy the current temperature into a global variable: "global_battery_temperature = battery_temperature;"
Third, use the global variable {global_battery_temperature} in your widget instead of {battery_temperature}.
Now, every time the battery level changes, the temperature reading on your widget should be updated.