ok. I pushed some fixes back to @bptworld to examine and republish. This should be a more stable release. Now let me tell you why I got into this mini-project and spent a whole Tuesday reverse-engineering code
I was looking to create an informative dashboard on Sharptools.io. However, for non-standard devices, some standard capabilities needed to be created beyond presence in order to utilize the hero tile feature that lets you display information and toggle active state based on what they recognize as normative capabilities.
So I needed to create the following capabilities:
switch - to toggle state of wifi tile
contact - to toggle state of charging tile
acceleration - to toggle state of distance tile
temperature - to allow for multiple states of speed tile - that would allow me to define custom speed ranges for each member of the family (wife = leadfoot, me = standard driver & 2 * teens who should be careful as I am watching them)
While going through this, I encountered some inconsistencies in the presence logic and some triggers for updates so I decided to go in deeper and sort things around in a manner that I understand them. I tried to leave some comments to what I changed and streamlined and certainly there may be some issues still lurking which I can take a look at once reported.
In the meantime, below are two screenshots of how my dashboard looks like as a whole and an annotated version that I hope clarifies some things.
Enjoy, Avi