I'm trying to make the Google Smart Home API work on Gladys Assistant (it's an open-source home automation software), and I struggle to make Google Integrations tests pass.
This is my onSync:
onSync
{
    "requestId": "9164924531720238290",
    "payload": {
        "agentUserId": "9aba8230-9e8d-47b7-9d1c-f4dd8725aad3",
        "devices": [
            {
                "id": "mqtt-lamp-temperature",
                "type": "action.devices.types.LIGHT",
                "traits": [
                    "action.devices.traits.ColorSetting",
                    "action.devices.traits.Brightness",
                    "action.devices.traits.OnOff"
                ],
                "name": {
                    "name": "Lampe Temperature"
                },
                "attributes": {
                    "colorModel": "rgb",
                    "colorTemperatureRange": {
                        "temperatureMinK": 2000,
                        "temperatureMaxK": 9000
                    }
                },
                "deviceInfo": {
                    "model": null
                },
                "roomHint": "Grand Salon",
                "willReportState": true
            }
        ]
    }
}
This is what I'm sending to reportState:
reportState
{
  online: true,
  color: { temperatureK: 3000, spectrumRgb: 8388863 },
  on: true
}
This is what the onQuery is returning to the Google API:
onQuery
{
  'mqtt-lamp-temperature': {
    online: true,
    color: { temperatureK: 3000, spectrumRgb: 8388863 },
    on: true
  }
}
But this is what Google sees in the integrations tests:
AssertionError: Expected state to include: 
{"color":{"temperatureK":{"xRange":[2600,3200]}}}, 
actual state: {"color":{"spectrumRGB":8388863},"on":true,"online":true}: expected false to be true
It seems Google completely ignores the temperatureK attribute when the spectrumRgb attribute is here.
To confirm my theory, I tried to create a lamp that has only spectrumRgb and a light that has only temperatureK, and then it works perfectly. The problem is, in that case, some tests are skipped and I think I won't get validated by Google with that.
My question is:
Why does those attributes do not work together? Can't a light be controlled by its temperature and by it's RGB ?
Do you see anything weird in my implementation?
Thanks a lot for your help!
