You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Actions On Google thermostat自定义模式集成失败问题排查求助

Troubleshooting Actions on Google Thermostat Failure After Adding Custom Modes

Hey there, let's dig into why your thermostat integration broke after adding custom modes. You mentioned it worked fine for temperature read/write before, so the issue is almost certainly tied to the Modes trait configuration in your sync response. Let's break down the potential problems and fixes:

1. Invalid Thermostat Mode Value

Looking at your availableThermostatModes array, you included "on" as an option—but this isn't a standard mode recognized by Google's TemperatureSetting trait. The valid modes are: off, heat, cool, heatcool, auto, eco, dry, fanonly. Using an unrecognized mode will cause the sync response to be rejected, which would disable your entire device integration.

Fix: Replace "on" with the appropriate standard mode. If your thermostat's "on" mode auto-switches between heating and cooling, use "heatcool" instead.

2. Ambiguity Between Built-in and Custom Modes

You're using both the TemperatureSetting trait (which has its own native thermostat modes) and the Modes trait for custom scene modes. This can create confusion for Google's Assistant unless the custom mode group is clearly distinguished from the default thermostat modes.

Fix:

  • Rename your custom mode group's name to a unique, machine-readable identifier (e.g., "custom_scene_modes" instead of "temperature_state").
  • Update the nameValues synonyms to clarify this is a separate set of modes. For example, in English, add phrases like "custom mode" or "scene setting" to avoid overlap with the default thermostat mode commands.

3. Verify Sync Response Basics

Double-check these easy-to-miss details that can break integration:

  • Ensure the requestId in your sync response exactly matches the one from the incoming sync request. Mismatched IDs will cause Google to ignore your response entirely.
  • Confirm willReportState is set correctly—if you're reporting state updates, make sure your implementation is sending valid state reports (invalid reports can also break functionality over time).

4. Test Incrementally to Isolate the Issue

To pinpoint exactly what's causing the failure:

  1. Remove the Modes trait entirely from your sync payload and confirm the thermostat works again for basic temperature controls.
  2. Re-add the Modes trait with just one custom mode (e.g., only "comfort") and test if sync succeeds.
  3. Gradually add each additional mode, testing after each addition to find if a specific mode's configuration is the culprit.

Modified Sync Payload Example

Here's a trimmed version of your payload with the key fixes applied:

{
  "payload": {
    "agentUserId": "qba-001-3464",
    "devices": [
      {
        "traits": [
          "action.devices.traits.TemperatureSetting",
          "action.devices.traits.Modes"
        ],
        "willReportState": true,
        "name": {
          "defaultNames": ["qba-001-3464"],
          "name": "qba-001-3464",
          "nicknames": ["ENGIE boxx"]
        },
        "attributes": {
          "availableThermostatModes": [
            "off",
            "heat",
            "cool",
            "heatcool" // Replaced invalid "on" with standard mode
          ],
          "thermostatTemperatureRange": {
            "maxThresholdCelsius": 30,
            "minThresholdCelsius": 6
          },
          "availableModes": [
            {
              "ordered": false,
              "settings": [
                {
                  "settingValues": [
                    {"lang": "en", "settingSynonym": ["comfort"]},
                    {"lang": "nl", "settingSynonym": ["comfort"]},
                    {"lang": "fr", "settingSynonym": ["confort"]}
                  ],
                  "settingName": "comfort"
                }
                // Add other modes back one by one for testing
              ],
              "nameValues": [
                {
                  "nameSynonym": ["custom mode", "scene", "setting"],
                  "lang": "en"
                },
                {
                  "nameSynonym": ["aangepaste modus", "scene", "instelling"],
                  "lang": "nl"
                },
                {
                  "nameSynonym": ["mode personnalisée", "scène", "réglage"],
                  "lang": "fr"
                }
              ],
              "name": "custom_scene_modes" // Unique identifier for custom modes
            }
          ],
          "thermostatTemperatureUnit": "C"
        },
        "id": "qba-001-3464",
        "type": "action.devices.types.THERMOSTAT",
        "deviceInfo": {
          "swVersion": "qb2/uni/5.39.6",
          "model": "ENGIEboxx",
          "manufacturer": "Toon",
          "hwVersion": "6599-1500-5000"
        }
      }
    ]
  },
  "requestId": "12754277927386056776"
}

Try these changes and let me know if your integration starts working again.

内容的提问来源于stack exchange,提问作者JasperR

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 04:37:54