Do you mean reverse engineering the API response from the "set home/away" command?
If yes, then I sort of[1] do this for the "status" part of the response, so I can give useful error messages back (e.g. wrong "structure id")
[1] https://github.com/emilburzo/nest-rest/blob/master/src/main/...