09-17-2024 07:08 PM
Hello,
I kept getting the following error when trying to run the test suite for a CURTAIN device with only the "action.devices.traits.OpenClose" trait:
Check Report State and Query discrepancy | failed |
I've made sure no where in the code is sending the "on" state to google, and I can see that right after linking the account there's no "on" state when I checked the devices on https://home-testsuite.webapps.google.com/devices. However once I trigger a query or execute command through the google home app, the "on" state appears on the homw graph viewer page, and that's causing the test suite to keep failing.
At this point I'm not sure how to proceed since my code is not sending the state yet this keeps failing. Please suggest how to resolve this.
Answered! Go to the Recommended Answer.
10-02-2024 03:45 PM
Ok, it appears to be an caching issue with Home Graph, after disconnecting from the action, waiting for a few days and re-linking, the "on" state is gone and all the tests in the test suite passed.
I don't know what's the minimum wait time for the cache to be fully cleared but a couple of hours didn't work for me. It would be great if this kind of information is documented in the developer portal.
09-18-2024 04:04 PM
The error message "Check Report State and Query discrepancy" indicates a mismatch between the reported state of your CURTAIN device and the state queried by the test suite.
Report state refers to the state your device reports to Google Home. You've confirmed you're not sending the "on" state explicitly.
Query state refers to the state Google Home retrieves from your device when querying its status. In this case, the test suite is fetching the "on" state even though your code isn't sending it.
There might be a discrepancy between the initial state of your device and the expected state by Google Home. Check if your device has any default behavior after linking the account. It might be starting in the "on" position by default.
Also, have you tried to set up the device to on/off state purposefully before running the test suite?
09-18-2024 07:26 PM - edited 09-18-2024 07:26 PM
I've carefully checked the code and I'm sure that there's no code that sets the "on" state, and as I described earlier right after linking the account the home graph viewer doesn't show the "on" state either. It's after an explicit query or execute command that the "on" state appears in the home graph viewer, and my code is not sending that in any of these commands (I did a global search of "on" in the codebase and there's no occurrence of that at all). I'm really not sure where that state comes from.
09-19-2024 10:30 AM
Can you please share the screenshot of Test Suite results?
09-20-2024 06:04 PM
Please check the screenshot below:
09-24-2024 09:55 PM
@GoogleDevForum any clue what might be the cause?
10-01-2024 01:33 AM
Can you please share the full Sync Response?
10-02-2024 03:45 PM
Ok, it appears to be an caching issue with Home Graph, after disconnecting from the action, waiting for a few days and re-linking, the "on" state is gone and all the tests in the test suite passed.
I don't know what's the minimum wait time for the cache to be fully cleared but a couple of hours didn't work for me. It would be great if this kind of information is documented in the developer portal.
02-23-2025 08:44 AM