Đặc điểm của thiết bị
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chức năng của các loại thiết bị được hình thành từ các đặc điểm mà bạn thêm vào mỗi loại thiết bị. Mỗi loại thiết bị có một số đặc điểm đề xuất, nhưng bạn có thể thêm bất kỳ đặc điểm nào bạn muốn.
Tên | Đặc điểm thiết bị | Mô tả | Loại thiết bị đề xuất |
Độ sáng | action.devices.traits.Brightness | Chế độ cài đặt độ sáng tuyệt đối nằm trong phạm vi chuẩn hoá từ 0 đến 100 (từng đèn có thể không hỗ trợ mọi điểm trong dải dựa trên cấu hình LED của chúng). | Hướng dẫn ánh sáng |
ColorSpectrum | action.devices.traits.ColorSpectrum | Điều này áp dụng cho các bóng đèn "đầy đủ" có dải màu RGB. Đèn có thể có sự kết hợp bất kỳ của ColorSpectrum và ColorNhiệt độ. Đèn nhấn và dải LED có thể chỉ có Spectrum, trong khi một số bóng đèn đọc sách chỉ có Nhiệt độ. Bạn không được sử dụng bóng đèn cơ bản hoặc đèn câm trên phích cắm thông minh. | Hướng dẫn ánh sáng |
ColorNhiệt độ | action.devices.traits.ColorTemperature | Điều này áp dụng cho các bóng đèn "ấm" có điểm màu tính bằng Kelvin. Phương thức này thường là một phương thức riêng biệt với ColorSpectrum, và có thể có các điểm trắng thông qua Nhiệt độ mà Spectrum không thể tiếp cận. Dựa trên các đặc điểm có sẵn, Google có thể chọn chế độ thích hợp để sử dụng dựa trên yêu cầu và loại ánh sáng (ví dụ: Đèn phòng khách có màu trắng có thể gửi lệnh Nhiệt độ đến một số bóng đèn và lệnh Spectrum đến các dải đèn LED). | Hướng dẫn ánh sáng |
Gắn đế | action.devices.traits.Dock | Đặc điểm này được thiết kế cho các thiết bị di động tự ra lệnh để quay lại sạc. | Nhiều thiết bị |
Tắt | action.devices.traits.OnOff | Chức năng cơ bản bật và tắt của bất kỳ thiết bị nào bật và tắt tệp nhị phân, bao gồm cả phích cắm và nút chuyển, cũng như nhiều thiết bị trong tương lai. | Hướng dẫn ánh sáng |
Bắt đầu | action.devices.traits.StartStop | Việc khởi động và dừng thiết bị sẽ có chức năng tương tự như bật và tắt thiết bị. Các thiết bị kế thừa hàm đặc điểm này theo cách khác nhau khi bạn bật và khi khởi động. Không giống như các thiết bị chỉ bật và tắt, một số thiết bị có thể khởi động và dừng cũng có thể tạm dừng trong khi thực hiện thao tác. | Bất kỳ, chủ yếu là các thiết bị, máy hút bụi và những thiết bị khác có hành vi hoạt động nêu trên và ngoài nguồn |
Cài đặt nhiệt độ | action.devices.traits.TemperatureSetting | Đặc điểm này bao gồm việc xử lý cả chế độ điểm nhiệt độ và chế độ. | Hướng dẫn về máy điều nhiệt |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2023-12-02 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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) |"]]