How do I add a 0-360 Position Tile with the ST Anything Parent handler?

I’m using the ST Anything library for my Antenna Position app which displays 0-360 degrees and the Li-Ion battery voltage level fine via the serial monitor; however, the Android app under the SmartThings Classic app only shows the Voltage because I’m using the PS_Voltage Child Sensor.
I didn’t want to modify the parent handler to directly add the position tile, but I don’t know how else to simply tell the parent, “Display this integer value as Degrees”. I also wanted to auto-update my web page to show the current position whenever it changes, but I can’t since the client/server is strictly a GET/POST thing. The app should be able to update fine. I would rather it be asynchronously updated whenever the position changes; however, polling is fine since I figure checking it ever 200 ms would be just as expensive as having the Arduino esp8266wifi send an interrupt since it’s already looping about 1000/s.
Sorry if this is a basic question. I am just not familiar enough with the ST Anything parent handler for all of the child sensors. I just saw that the voltage child does a lot of stuff to handle that process, but the position data is already known, so I was looking for a direct insertion mechanism such as the RSSI value that the parent already displays, perhaps a trivial tile child subroutine.

You should ask your question in the author thread for that code. The author will be automatically notified when new posts are added, and other people using the same library will also see it and may be able to help

1 Like