تم إيقاف إجراءات المحادثات نهائيًا في 13 حزيران (يونيو) 2023. لمزيد من المعلومات، يُرجى الاطّلاع على
إنهاء إجراءات المحادثة.
تسجيل السمات
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يجب أن يتمكن "مساعد Google" من ربط طلب
بطلب لإرساله إلى جهازك. لكي ينجح هذا، تحتاج إلى تعريف أنواع
القدرات التي يدعمها جهازك. تُعرف هذه القدرات باسم السمات. تُعلن عن هذه السمات في طراز جهازك.
أنشأ محرّك بحث Google من قبل مجموعة متنوعة من السمات الشائعة
الموجودة في العديد من الأجهزة. لا ترتبط هذه السمات بنوع واحد فقط من الأجهزة،
يمكنك استخدامها كما تريد.
إضافة سمة
لقد عرّفت نموذجًا سابقًا، قم بتحديثه الآن بإضافة سمة. في هذه الحالة، أضف سمة تشغيل/إيقاف للتحكم في مصباح LED المتصل بجهازك.
افتح المشروع في وحدة تحكُّم الإجراءات.
حدّد علامة التبويب تسجيل الجهاز من شريط التنقل الأيمن.
انقر على نموذج من القائمة لتعديله.
انقر على القلم الرصاص في مربّع السمات المتوافقة لإضافة السمة.
ضع علامة في مربّع الاختيار OnOff. انقر على حفظ.
تأكد من حفظ التغييرات على النموذج. انقر على حفظ مرة أخرى.
الخطوة التالية
التعامل مع الأوامر
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eGoogle Assistant utilizes "traits" to link user queries to device commands, requiring developers to define device capabilities within their device model.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides pre-built traits for common device functionalities, offering flexibility in implementation across various device types.\u003c/p\u003e\n"],["\u003cp\u003eTo add a trait, developers can access their device model through the Actions Console, select the desired trait from the available options, and save the changes.\u003c/p\u003e\n"],["\u003cp\u003eThe example demonstrates adding an On/Off trait for controlling an LED, illustrating the process of extending device functionality.\u003c/p\u003e\n"]]],["Device functionality is enabled by declaring supported abilities, known as traits, within a device model. These traits, provided by Google, are reusable across various devices. To add a trait, users must access the Actions Console, navigate to Device Registration, select a model, and edit its Supported traits. For instance, to add On/Off control for an LED, the OnOff trait is selected and saved in the device's model, with another save step to finalize.\n"],null,["# Register Traits\n\nThe Google Assistant needs to be able to associate a query with a\ncommand to send to your device. For this to work, you need to declare what kinds\nof abilities your device supports. These abilities are known as *traits*. You\ndeclare these traits within your device model.\n\nGoogle has already created a wide variety of common [traits](/assistant/sdk/reference/traits)\nfound on many devices. These traits are not tied to just one device type, you can\nuse them as you choose.\n\nAdd a trait\n-----------\n\nYou previously defined a model, now update it by adding a trait. In this case,\nadd an On/Off trait to control an LED attached to your device.\n\n1. Open the project in the [Actions Console](https://console.actions.google.com/).\n\n2. Select the **Device registration** tab from the left navbar.\n\n3. Click a model from the list to edit it.\n\n4. Click the pencil in the **Supported traits** box to add the trait.\n\n5. Select the **OnOff** checkbox. Click **SAVE**.\n\n6. Make sure to save changes to the model. Click **SAVE** again.\n\nNext step\n---------\n\n[Handle Commands](/assistant/sdk/guides/service/python/extend/handle-device-commands)"]]