I have a “tile” that shows several status indicators. One specifically shows whether we’re all in bed or if someone’s still about. (I use that for motion sensor conditions.)
The problem is, a simple toggle button will show the status accurately, but the status indicator on my tile doesn’t show a change until I refresh the browser.
Is there a way around that?
Here’s another clue to this puzzle: I’m working on a “locking spigot button” where a tap on the button will toggle water flow on/off with a timer that will automatically turn the water off again after two hours. The “lock” keeps the water on until you manually turn the water off. If you “unlock” the spigot, it will wait the remainder of two hours (if any) and then shut off. All that works now with one button for the spigot and another for the lock. What I wanted to do was combine the two so that the lock would show as an icon over the spigot. A tap will toggle the water on/off and the hold will toggle the lock on/off.
In this too, the lock status indicator does not reflect the state of the lock unless you refresh the browser but this is only if this functionality is in a template. If you code the button using a more basic template (standard-button) with all the functionality “hard-coded” into the button, it not only works, but the templated button will now also work. (Templated button with no hard-coded button = refresh required. Templated button with hard-coded button = both buttons work without refresh.)
Is that weird or what?