ลักษณะเฉพาะของอุปกรณ์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ฟังก์ชันสําหรับอุปกรณ์แต่ละประเภทมาจากลักษณะเฉพาะที่คุณเพิ่มไปยังแต่ละประเภท
อุปกรณ์แต่ละประเภทมีคุณลักษณะที่แนะนําอยู่จํานวนหนึ่ง แต่คุณสามารถเพิ่มแบบใดก็ได้ที่ต้องการ
ชื่อ |
ลักษณะเฉพาะของอุปกรณ์ |
คำอธิบาย |
ประเภทอุปกรณ์ที่แนะนํา |
ความสว่าง |
action.devices.traits.Brightness |
การตั้งค่าความสว่างสัมบูรณ์จะอยู่ในช่วงที่อยู่ในช่วง 0 ถึง 100 (ไฟแต่ละดวงอาจไม่รองรับทุกจุดในช่วงตามการกําหนดค่าไฟ LED) |
คู่มือ Light |
ColorSpectrum |
action.devices.traits.ColorSpectrum |
ใช้กับหลอดไฟสี "เต็ม" ที่รับช่วงสี RGB หลอดไฟอาจมีคู่ของ ColorSpectrum กับ ColorTemperature ร่วมกันได้ โดยไฟเฉพาะจุดและไฟ LED อาจมีเฉพาะสเปกตรัม แต่หลอดไฟหลอดไฟบางตัวอาจมีแค่อุณหภูมิเท่านั้น หลอดไฟพื้นฐานหรือหลอดไฟดัมพ์บนปลั๊กอัจฉริยะไม่มีทั้ง 2 แบบ |
คู่มือ Light |
อุณหภูมิสี |
action.devices.traits.ColorTemperature |
ตัวเลือกนี้ใช้กับหลอดไฟ "อุ่น" ที่กลายเป็นจุดสีในเคลวิน ซึ่งมักเป็นวิธีการที่แยกต่างหากจาก ColorSpectrum
และอาจมีจุดสีขาวอยู่ที่อุณหภูมิที่ Spectrum ไม่สามารถเข้าถึงได้ Google อาจเลือกโหมดที่เหมาะสมโดยอิงตามคําขอและประเภทไฟตามสิ่งต่างๆ ที่มีอยู่
(เช่น ทําให้ไฟในห้องนั่งเล่นเป็นสีขาว อาจส่งคําสั่งวัดอุณหภูมิไปยังหลอดไฟและคําสั่ง Spectrum ไปยังแถบ LED) |
คู่มือ Light |
ไก่ |
action.devices.traits.Dock |
ลักษณะเฉพาะนี้ออกแบบมาเพื่ออุปกรณ์เคลื่อนที่ที่สามารถสั่งการให้กลับมาชาร์จไฟได้ |
เครื่องใช้ไฟฟ้ามากมาย |
ปิด |
action.devices.traits.OnOff |
ฟังก์ชันเปิดและปิดแบบพื้นฐานสําหรับอุปกรณ์ทุกประเภทที่มีการเปิดหรือปิดไบนารี รวมทั้งปลั๊กและสวิตช์ รวมถึงอุปกรณ์ในอนาคตอื่นๆ |
คู่มือ Light |
เริ่มต้น |
action.devices.traits.StartStop |
การเปิดหรือปิดอุปกรณ์มีฟังก์ชันคล้ายกับการเปิดหรือปิด อุปกรณ์สืบทอดลักษณะดังกล่าวจะแตกต่างกันเมื่อเปิดและเริ่มทํางาน อุปกรณ์บางชนิดสามารถเริ่มและหยุดการทํางานชั่วคราวในระหว่างที่อุปกรณ์เปลี่ยนการทํางานระหว่างเปิดและปิดอุปกรณ์ |
อุปกรณ์ต่างๆ ส่วนใหญ่เป็นเครื่องดูดฝุ่นและสิ่งอื่นๆ ที่มีการทํางานเฉพาะกิจกรรม อยู่เหนือพลังงาน |
การตั้งค่าอุณหภูมิ |
action.devices.traits.TemperatureSetting |
ลักษณะนี้ครอบคลุมการจัดการทั้งจุดอุณหภูมิและโหมด |
ตัวควบคุมอุณหภูมิ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[null,null,["อัปเดตล่าสุด 2023-12-02 UTC"],[[["\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) |"]]