Battery temp in widget?
Moderator: Martin
Battery temp in widget?
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?
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.
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.