We implemented a Smart Home Action for our cloud solution which allows us to control our thermostats. Also, the Report State feature was implemented, but we have trouble in the next case:
Case:
UserA which is signed in to Google Home app with Google account [email protected] does a linking process (authorizes) via our Smart Action with account [email protected] -> All devices are synced to him correctly
UserB which is signed in to Google Home app with Google account [email protected] does a linking process (authorizes) via our Smart Action with the same account as UserA did: [email protected] -> All devices are also are synced to him correctly.
On our backend, two times is triggered SYNC request for user [email protected] as both of them used the same account for linking. After SYNC request was triggered, we started to send Google Report State events. At the current step, everything is ok.
But, if for example, UserA unlinks his account -> Google sends a DISCONNECT intent and as it is said in the documentation we should stop sending Report State events. And here goes an issue: UserB still has linked account for [email protected] and if we stop sending Report State events, userB will receive incorrect data.
What should we do in the case? How to handle this right? When do we should stop send a Report State events?