歡迎來到 Google Home 開發人員中心,你可以在這裡學習如何學習智慧型住宅動作。注意事項:您將在 Actions 主控台建構動作。

智慧型住宅 TemperatureControl Trait 結構定義

action.devices.traits.TemperatureControl - 將裝置 (支援溫度控制器以外的溫度) 進行訓練,無論是在裝置內部或周圍。

這與 TemperatureSetting 特徵不同,專為溫度控制器樣式控制項所設計。TemperatureSetting 特性代表環境 (房間/戶外) 溫度,不用於控制特定裝置的溫度。你必須使用 TemperatureControl 特性才能控制特定裝置的溫度。

裝置屬性

具此特性的裝置可能會在 SYNC 作業中回報下列屬性。如要進一步瞭解如何處理 SYNC 意圖,請參閱意圖執行要求

屬性 類型 說明
temperatureRange 物件

必要。

裝置支援的溫度範圍。

minThresholdCelsius Number

必要。

範圍的最低溫度,以攝氏為單位。

maxThresholdCelsius Number

必要。

範圍的溫度,以攝氏為單位。

temperatureStepCelsius Number

指定相對溫度步驟。這是裝置支援的最小間隔間隔時間。如未指定,相對步驟將以 temperatureRange 的百分比計算。

temperatureUnitForUX 字串

必要。

用於回應使用者的溫度單位。

支援的值:

C
F
commandOnlyTemperatureControl 布林

(預設值:false)

指出裝置是否支援單向 (true) 或雙向 (false) 通訊。如果裝置無法針對此特性回應 QUERY 意圖或報告狀態,請將這項屬性設為 true。

queryOnlyTemperatureControl 布林

(預設值:false)

如果裝置支援「僅限查詢」執行作業,則為必要欄位。這項屬性可指出裝置只能查詢狀態資訊,且無法控制。

範例

裝置支援將華氏 150 到 500 度控制,單位為 5 度。

{
  "temperatureRange": {
    "minThresholdCelsius": 65.5,
    "maxThresholdCelsius": 260
  },
  "temperatureStepCelsius": 2.778,
  "temperatureUnitForUX": "F"
}

裝置狀態

具有這個特性的實體可能會在 QUERY 作業中回報下列狀態。如要進一步瞭解如何處理 QUERY 意圖,請參閱意圖執行要求

類型 說明
temperatureSetpointCelsius Number

目前溫度設定點,以攝氏為單位。必須位於 temperatureRange 之內。如果將queryOnlyTemperatureControl設為false,則為必要欄位

temperatureAmbientCelsius Number

目前測得的溫度,以攝氏為單位。必須位於 temperatureRange 之內。

範例

裝置設定的溫度是多少?

{
  "temperatureSetpointCelsius": 150
}

裝置指令

具有此特性的裝置可能會回應 EXECUTE 作業中的下列指令。如要進一步瞭解如何處理 EXECUTE 意圖,請參閱意圖執行要求

action.devices.commands.SetTemperature

將溫度設為特定值。

參數

參數 類型 說明
temperature Number

必要。

要設定的溫度,以攝氏為單位。必須位於 temperatureRange 之內。

範例

將裝置的溫度設為華氏 350 度。

{
  "command": "action.devices.commands.SetTemperature",
  "params": {
    "temperature": 176.67
  }
}

設定目標溫度時發生錯誤。

支援的值:

alreadyAtMax
alreadyAtMin
valueOutOfRange

語音範例

de-DE

  • Erhöhe die Temperatur des Ofens
  • Stelle die Temperatur des Ofens auf 425 Grad
  • Wie warm ist der Ofen

en-US

  • I want the temperature of the oven higher
  • current temperature in the fridge
  • set the oven to 400

es-ES

  • pon la temperatura del horno a 180 grados
  • sube la temperatura del horno
  • ¿A qué temperatura está el horno ?

fr-FR

  • Le four est à quelle température ?
  • Mets la température du four à 180 degrés .
  • augmente la température du four

hi-IN

  • ओवन का टेम्परेचर कितना है
  • ओवन का तापमान 425 डिग्री पर करें

it-IT

  • Alza la temperatura del forno
  • Qual è la temperatura del frigo ?
  • metti il forno a 200 gradi

ja-JP

  • オーブン の温度は何度
  • オーブン の温度を 425度 に設定して
  • オーブン の温度を上げて

ko-KR

  • 오븐 온도 180 도로 맞춰
  • 오븐 온도 몇 도야
  • 오븐 온도 좀 높여 줄래

nl-NL

  • stel de oven in op 220 graden
  • verhoog de temperatuur van de oven
  • wat is de temperatuur van de oven

pt-BR

  • Diz-me qual é a temperatura da sala
  • Qual é a temperatura do forno ?
  • ajuste a temperatura do forno para 180 graus
  • aumenta a temperatura do forno
  • aumentar a temperatura do forno
  • define a temperatura do termostato nos 22 graus

sv-SE

  • Vad är det för temperatur i ugnen ?
  • höj temperaturen i ugnen
  • sätt ugnen 100 grader

裝置 ERRORS

請參閱錯誤和例外狀況的完整清單。