Closed Clon1998 closed 5 years ago
Hey @Clon1998 thanks for adding the issue, I didn't see this API on the documentation, unfortunately I couldn't try it out on my device because it says I've auto-assist enabled, so let me know if it works, thanks again!
@GiorgioBertolotti i can confirm that 0.6 is working. Guess if you have Tado Premium it doenst work...
Maybe its worth adding a comment mentioning that the API return msg in case of the fencing errors i mentioned earlier are wrong.
Example:
Tado is set in HOME and some mobile Devices are inside the Fence.
Trying to run this Code/API call:
home.setState(new TadoState("AWAY"),connector);
API return msg:
"Tried to update to HOME though all mobile devices are detected outside the home fence"
And if you try to set it to HOME and no device is inside the fence you will get the Error msg saying sth like. Tried to update to AWAY though all mobile devices are detected inside the home fence
And if you try to set the same state as it currently is in, the API will return nothing!
@Clon1998 Thanks for reporting this behaviour, I'll add it to the API documentation soon! Have a nice day!
Add the setPresence API call. TadoState can be set as AWAY or HOME.
The presence can only be set to AWAY/HOME if all GeoFencing Devices are outside/inside the Fence. In case that you try to set it to AWAY and there are still Devices in the GeoFence, the API will response with an Error (The Err Msg. provided by the API is actually wrong/switch around xD) In case update Presence was successful, no JSON respone is provided. Example Impl: