当您与Google Assistant such as "Hey Google, turn on the bedroom light", Hey Google is the invocation and turn on the bedroom light is known as the grammar. Google determines the smart home intent from the grammar and sends it over to the developer cloud (fulfillment). The developer can then execute the command on the device and returns a response back to Google.的对话时
执行方式处理 intent 并返回响应后,smart home 操作将依赖于 Google Home Graph . With Home Graph, Assistant can sync devices, query device states, and execute commands on a device.
设备类型
设备类型让 Assistant 知道应对你的设备使用什么语法。例如,如果您将设备定义为灯,用户可以通过 Assistant 通过 Ok Google,开灯与设备互动。
如需查看受支持设备类型的完整列表,请参阅设备类型。
设备特征
设备特征定义各个设备类型的功能。您可以结合使用多种设备特征与任何设备类型。例如,您可以让灯设备使用 OnOff、Brightness 和 FanSpeed 特征。虽然 FanSpeed 特征可能不是灯最常用的特征,但你可以对新设备使用任何特征。
向你的设备类型添加设备特征后,设备会继承你添加的每个设备特征的状态。例如,当您使用 OnOff 特征时,设备现在可以将其 on
状态报告为 true
或 false
。
如需查看受支持特征的完整列表,请参阅设备特征。