I have made a custom slider toggle switch using the HTML canvas widget type. I have used JavaScript’s setInterval() to have it refresh every 3s so that external changes (API, other widgets) to its variable update its state.
One thing I notice is that the stock switch widget updates instantly when external variable changes happen. Is there a way for me to do this in my HTML canvas widget? Is there some sort of streaming API that I am unaware of?