Change Visibility based on a Tasker Variable

Is it possible to change the visibiity of a layer / komponent etc based on a Tasker Variable?

- I have a set of media player controls I'd like to see only if I am at home. I can set this using Tasker to check a combination of being connected to home wifi / cell tower location or GPS but cannot see how to incorporate it into the visibilty in KLWP?

Hi Rob,

Yes you can do that, just do this:

  • Add to Tasker a KLWP/KWGT send variable plugin, set Kustom variable name to "media" for example and lets assume value will be 1 when media should be visible and 0 when not (this needs to be done in Tasker somehow)
  • In Kustom go to the Layer or Komponent you want to see / hide, go to the "Layer" tab, select the visibility option and turn it into a formula by clicking the calculator icon on top
  • Use a formula like "$if(br(tasker, media), ALWAYS, NEVER)$"
  • Done

P.S. you can potentially do this also in native Kustom Kode by using $li(lplat)$ / $li(lplon)$ and assuming you know your GPS coords

Thanks Frank, this is excellent.

I wasn't seeing the calculator icon and so couldn't figure how to set visibility on custom formula. I initially had the variable called home and it wasn't working but when I changed it to media it worked great.