對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
裝置特徵
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
裝置類型的功能來自您為每個類型新增的特性。每種裝置類型都有幾種建議特性,但您也可以新增任何偏好的屬性。
姓名 |
裝置特色 |
說明 |
建議裝置類型 |
亮度 |
action.devices.traits.Brightness |
絕對亮度設定在正規化值到 0 到 100 之間 (個別燈具可能不支援根據 LED 設定範圍中的每個點)。 |
淺色指南 |
色彩規格 |
action.devices.traits.ColorSpectrum |
這適用於採用 RGB 顏色範圍的「全彩」燈泡。燈具可包含 ColorSpectrum 和 ColorTemperature 的組合,強調光源和 LED 條紋可能只能有 Spectrum,而部分讀取燈泡的溫度只有溫度。基本燈泡或智慧型插座的燈泡都沒有。 |
淺色指南 |
色溫 |
action.devices.traits.ColorTemperature |
這適用於在 Kelvin 會上色顏色的「暖」燈泡。這通常與 ColorSpectrum 的獨立型態,也可能有透過 Spectrum 無法到達的溫度。視可用特徵而定,Google 可能會根據要求和光源類型選擇適當的模式 (例如,將客廳的燈光變成白色,可能會將溫度指令傳送至部分燈泡,以及指定 Spectrum 指令)。 |
淺色指南 |
座架 |
action.devices.traits.Dock |
這項特性是針對自助式行動裝置所設計,能夠指示裝置回傳資料以進行充電。 |
多種設備 |
關閉 |
action.devices.traits.OnOff |
針對任何開啟及關閉二進位檔的裝置,包括電源和外接切換裝置,以及許多日後的裝置,都包括基本和關閉功能。 |
淺色指南 |
啟動 |
action.devices.traits.StartStop |
啟動及停止裝置提供了類似的功能,讓使用者在開啟及啟動裝置時開啟或關閉這項功能。有些裝置只是直接開啟和關閉狀態,部分裝置在啟動作業後也可以暫停。 |
任何 - 主要是電器、吸塵器,以及其他具有特定活動行為的電池 |
溫度設定 |
action.devices.traits.TemperatureSetting |
這項特性涵蓋處理溫度點和模式的情況。 |
溫度控制器 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[null,null,["上次更新時間:2023-12-02 (世界標準時間)。"],[[["\u003cp\u003eDevice functionality is determined by assigned traits.\u003c/p\u003e\n"],["\u003cp\u003eEach device type has suggested traits, but you can customize them.\u003c/p\u003e\n"],["\u003cp\u003eTraits control actions like brightness, color, on/off state, and temperature.\u003c/p\u003e\n"],["\u003cp\u003eSome traits are recommended for specific device types, like lights or thermostats.\u003c/p\u003e\n"]]],["Device functionality is defined by added traits. Available traits include `Brightness` (0-100 range), `ColorSpectrum` (RGB), and `ColorTemperature` (Kelvin). `Dock` is for self-mobile devices returning for charging. `OnOff` provides basic on/off, while `StartStop` allows starting, stopping, and pausing. `TemperatureSetting` handles temperature points and modes. Each trait has recommended device types, but any combination can be used.\n"],null,["# Device Traits\n\nThe functionality for device types comes from the traits that you add to each one.\nEach device type has a number of recommended traits, but you can add whichever ones you\nwant.\n\n| Name | Device Traits | Description | Recommended Device Types |\n|--------------------------------------------------------------------------|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| [Brightness](/assistant/sdk/reference/traits/brightness) | `action.devices.traits.Brightness` | Absolute brightness setting is in a normalized range from 0 to 100 (individual lights may not support every point in the range based on their LED configuration). | [Light Guide](/assistant/smarthome/guides/light) |\n| [ColorSpectrum](/assistant/sdk/reference/traits/colorspectrum) | `action.devices.traits.ColorSpectrum` | This applies to \"full\" color bulbs that take RGB color ranges. Lights may have any combination of ColorSpectrum and [ColorTemperature](/assistant/sdk/reference/traits/colortemperature); accent lights and LED strips may just have Spectrum, whereas some reading bulbs just have Temperature. Basic bulbs, or dumb lights on smart plugs, have neither. | [Light Guide](/assistant/smarthome/guides/light) |\n| [ColorTemperature](/assistant/sdk/reference/traits/colortemperature) | `action.devices.traits.ColorTemperature` | This applies to \"warmth\" bulbs that take a color point in Kelvin. This is generally a separate modality from [ColorSpectrum](/assistant/sdk/reference/traits/colorspectrum), and there may be white points available via Temperature that cannot be reached by Spectrum. Based on available traits, Google may pick the appropriate mode to use based on request and light type (for example, *Make the living room lights white* might send Temperature commands to some bulbs and Spectrum commands to LED strips). | [Light Guide](/assistant/smarthome/guides/light) |\n| [Dock](/assistant/sdk/reference/traits/dock) | `action.devices.traits.Dock` | This trait is designed for self-mobile devices that can be commanded to return for charging. | Various appliances |\n| [OnOff](/assistant/sdk/reference/traits/onoff) | `action.devices.traits.OnOff` | The basic on and off functionality for any device that has binary on and off, including plugs and switches as well as many future devices. | [Light Guide](/assistant/smarthome/guides/light) |\n| [StartStop](/assistant/sdk/reference/traits/startstop) | `action.devices.traits.StartStop` | Starting and stopping a device serves a similar function to turning it on and off. Devices that inherit this trait function differently when turned on and when started. Unlike devices that simply have an on and off state, some devices that can start and stop are also able to pause while performing operation. | Any - mostly appliances and vacuums and other things that have specific activity behavior above and beyond power |\n| [TemperatureSetting](/assistant/sdk/reference/traits/temperaturesetting) | `action.devices.traits.TemperatureSetting` | This trait covers handling both temperature point and modes. | [Thermostat Guide](/assistant/smarthome/guides/thermostat) |"]]