Make variables non-changeable in widgets

Hello!

I use variables and flows to store some basic information. This is shown on my home screen/dashboard.

A short press on the variables returns a pop up window to manually change the values. I would like to disable this feature.

Would it be possible to add an option to the widget so that information is non-changeable?

3 Likes

Hi @maccalo ,
I guess it is not possible to lock a variable. But there are segways to do something similar.

One simple one is to us two variables Innetemperatur and Innetemperatur_orig.
With a flow DontTouchInnetempertur:
When variable Innetemperatur changed

  • Disable flow dontTouchInnetemperatur
  • Set variable Innetemperatur to innetemperatur_orig
  • Delay 2 seconds
  • Enable flow DontTouchInnetemperatur

And the lines from Disable to enable you would also add to the flow, where you calculate or set the variable Innetemperatur_orig

Just my 2cts

Another workaround could be to make a virtual device just showing the value of the variable.

1 Like