TemperatureControl特性混乱

问题描述 投票:0回答:1

我刚开始使用Google动作。我们要支持的第一个特征是设备的温度读数。它不是恒温器,因此我们需要使用TemperatureControl特性(只读传感器,无控件)。

问题是,在实施TemperatureControl之后,我无法要求Google Assistant读出温度。有没有人遇到过类似的问题?我搜索了有关TemperatureControl的主题,似乎没有报告类似问题。提前致谢。

更详细的流程是:

问“卧室的温度是多少?”

  • 我在我的后端服务器中收到一个QUERY意图,并以环境温度响应

    但是答案是“抱歉,我现在无法到达卧室。请重试”

  • 之后,我尝试添加HumiditySetting特性以验证我的SYNC / QUERY有效性。可以了

    问“卧室的湿度水平是多少?”

  • 我在后端服务器中收到了QUERY意图,并以“环境湿度”进行了响应。实际上,它与温度情况下的响应相同。

    但是答案是“卧室的当前湿度读数为xx%”

  • 我的SYNC响应已通过https://developers.google.com/assistant/smarthome/tools/validator验证下面是一个示例:

{
    "requestId": "10692316150281033205",
    "payload": {
        "agentUserId": "1-5671",
        "devices": [
            {
                "id": "3466",
                "type": "action.devices.types.CAMERA",
                "traits"[
                    "action.devices.traits.HumiditySetting",
                    "action.devices.traits.TemperatureControl"
                ],
                "name": {
                    "defaultNames": [
                        "bedroom"
                    ],
                    "name": "bedroom",
                    "nicknames": [
                        "bedroom"
                    ]
                },
                "willReportState": true,
                "roomHint": null,
                "deviceInfo": null,
                "otherDeviceIds": null,
                "customData": {
                    "deviceId": "CQAMNGF"
                },
                "attributes": {
                    "temperatureUnitForUX": "C",
                    "queryOnlyHumiditySetting": true,
                    "queryOnlyTemperatureControl": true
                }
            }
        ],
        "errorCode": null
    }
}
actions-on-google
1个回答
0
投票

我发现了问题。

我在查询响应中使用了thermostatTemperatureSetpoint和thermostatTemperatureAmbient。

将它们更改回temperatureSetpointCelsius之后temperatureAmbientCelsius,它起作用。

© www.soinside.com 2019 - 2024. All rights reserved.