But am not seeing a way to create a query using the location or device endpoints that return the UUIDs for a hub’s location modes. Does anybody know how to do that?
Following on from this, how to get the current location mode of the hub and set it?
I tried querying the hub using the devices endpoint passing the hub’s device id but that doesn’t seem to return the current location mode.
Thanks again Graham. I am able to get the current mode with the GET, but changing it to a PUT and adding the body with an id that I retrieved with the call to modes endpoint, I am getting a 422 Unprocessable Entity status code. Is it working for you?
It is when I remove the stray semi-colon I inexplicably put in the JSON. I’d like to blame my having written the original post while lying awake at 4am in a Pinotage induced haze. However I wasn’t actually that hazy to start with and I still didn’t realize six hours later after more sleep, breakfast and coffee. So the body is meant to be valid JSON of the form: