1

According to the documentation Report State request should be send right after QUERY or EXECUTE request. However, when I do so I get the exception:

{
  "error": {
    "code": 404,
    "message": "Requested entity was not found.",
    "status": "NOT_FOUND"
  }
}

After ~1 minute those request works as expected. However, first request always fails. I believe this is because google haven't update the state inside for the linked device.

So my question is - how should I deal with that initial request in order to avoid the error?

Dmitriy Dumanskiy
  • 11,657
  • 9
  • 37
  • 57

1 Answers1

0

The platform implementation has been updated. According to the documentation:

Following the initial SYNC for a device, the platform sends a QUERY intent that gathers the state of the device to populate Home Graph. After that point, Home Graph only stores the state that is sent with Report State.

Note that this only occurs the first time. Subsequent QUERY intents will not update the Home Graph.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35