The issue is likely with your JSON structure in the reportState request. The Google Home API expects a specific format where device states should be directly under the device ID, not nested under a "states" object.
Try this corrected structure:
{
` "requestId": "456e09af-20df-463c-936e-92519cd1f554",
"agentUserId": "xxx",
"payload": {
"devices": {
"xxxx": {
"online": true,
"temperatureUnitForUX": "C",
"temperatureRange": {
"minThresholdCelsius": -20,
"maxThresholdCelsius": 99
},
"temperatureAmbientCelsius": 1.2,
"humidityAmbientPercent": 0
}
}
}
}`
Additional troubleshooting steps:
Verify device ID:
Ensure "xxxx" matches the exact device ID from your SYNC response
Check supported traits: Make sure your device actually supports the traits you're reporting (temperature, humidity)
Validate state values: Ensure all values are within acceptable ranges and data types
Helpful resources:
Debug tips:
Enable detailed logging in your Node.js app to see the exact request being sent
Use the Actions Console to test your integration
Check that your JWT token has the correct scopes for reportState
Can you also share your device's SYNC response to verify the supported traits match what you're reporting?