Search code examples
actions-on-googlegoogle-homegoogle-smart-home

Google Home report state request is working but not showing expected result?


I'm integrating google assistant with my application. The problem is when I send a report state request to assistant while inside a device screen in google home application, I get a 200 OK response with the requestId I'm sending, but the device screen doesn't update with the device state. (It gets updated after I go back and go to device screen again but that is done through query intent)

Sample Request Body

{  
   "payload" : {
      "devices" : {
         "states" : {
            "12364" : {
               "on" : true
                      }
                    }
                  }
               },
  "requestId" : "A7TNpoXlnG0OQWzpTvJAa4sjolAAt46q",
  "agentUserId" : "14556"
}

Sample Response Body

{ "requestId" : "A7TNpoXlnG0OQWzpTvJAa4sjolAAt46q" }

This is their documentation regarding the report state.

I even deployed the report state dashboard locally to monitor the state changes but it doesn't update as well.

Can anyone point me in right direction? Thanks!


Solution

  • The behavior of different Assistant surfaces with respect to Home Graph changes can vary, so it's best not to rely on looking for real-time UI changes in the Google Home app.

    The Report State Dashboard noted in the documentation that you linked is a good way to validate the state you publish to Home Graph graphically. We also recently published an AoG ProTips episode on this topic that shows you how to do the same from the command line.

    Neither of these methods will update automatically in real-time either, but you can refresh them after publishing a state change to verify the right data is in Home Graph.