支援的啟動條件、條件和動作

自動化動作支援下列啟動條件和動作。所有狀態也都能做為條件。

狀態/事件 (啟動條件)
限制條件
指令 (動作)
支援的欄位 說明
and 代表所有子項條件的邏輯 AND 複合條件。
assistant.command.Broadcast message
assistant.command.OkGoogle okGoogle
assistant.event.OkGoogle 查詢
device.command.ActivateScene 啟用 啟用或停用場景。
device.command.AppInstall newApplicationName 在指定裝置上安裝應用程式。
device.command.AppSearch applicationName 搜尋指定應用程式。
device.command.AppSelect applicationName 選取指定應用程式。
device.command.ArmDisarm arm
armLevel
cancel
設定裝置的警報等級。
device.command.BrightnessAbsolute 亮度 調整裝置的絕對亮度。如果亮度設為大於 0 的值,且裝置處於關閉狀態,裝置就會開啟,[`OnOffState.state`](./on_off_state) 也會變更,反映裝置已開啟。同樣地,如果亮度設為 0,裝置就會關機,[`OnOffState.state`](./on_off_state) 也會隨之變更。
device.command.BrightnessRelative brightnessRelativePercent
brightnessRelativeWeight
調整裝置相對亮度。如果亮度設為大於 0 的值,且裝置處於關閉狀態,裝置就會開啟,[`OnOffState.state`](./on_off_state) 也會變更,反映裝置已開啟。同樣地,如果亮度設為 0,裝置就會關機,[`OnOffState.state`](./on_off_state) 也會隨之變更。
device.command.Charge 充電 開始或停止充電。
device.command.ColorAbsolute color.name
color.spectrumHSV.hue
color.spectrumHSV.saturation
color.spectrumHSV.value
color.spectrumRGB
color.temperature
將顏色設為指定色相。如果裝置處於關閉狀態,設定顏色會開啟裝置,[`OnOffState.state`](./on_off_state) 也會隨之變更。同樣地,如果亮度設為 0,裝置就會關機,[`OnOffState.state`](./on_off_state) 也會隨之變更。
device.command.Cook cookingMode
foodPreset
quantity
start
unit
開始或停止烹飪。
device.command.Dispense amount
item
presetName
unit
提供商品。
device.command.Dock 將裝置放入底座。
device.command.EnableDisableGuestNetwork 啟用 啟用或停用訪客網路。
device.command.EnableDisableNetworkProfile enable
profile
啟用或停用網路設定檔。必須使用 PIN 碼進行雙重使用者驗證。如果其他安全性裝置因這些指令而停用,使用者的住家安全可能會受到影響。
device.command.Fill fill
fillLevel
為裝置注水或排水。
device.command.FindMyDevice 靜音 產生本機快訊,找出目標裝置。
device.command.HumidityRelative relativeHumidityPercent
relativeHumidityWeight
根據目前的值調整濕度。
device.command.LightEffectColorLoop 時間長度 讓裝置循環顯示一組顏色。
device.command.LightEffectPulse 時間長度 光線強度會從中等亮度增加到最大亮度,然後再降低到中等亮度,閃爍週期為每秒一次。在每個週期中,最大亮度應持續 200 毫秒,而中等亮度 (不含轉換期間) 應持續至少 500 毫秒。
device.command.LightEffectSleep 時間長度 在一段時間內,逐漸降低裝置的亮度,並視需要調整色溫。
device.command.LightEffectWake 時間長度 在一段時間內逐漸調高裝置亮度,並在裝置支援該效果時調整色溫。
device.command.LockUnlock 智慧門鎖 鎖定或解鎖裝置。
device.command.MediaNext 跳到下一個媒體項目。
device.command.MediaPause 暫停播放媒體。
device.command.MediaPrevious 跳至上一個媒體項目。
device.command.MediaResume 繼續播放媒體。
device.command.MediaShuffle 隨機播放目前的播放清單。
device.command.MediaStop 停止播放媒體。
device.command.Mute 靜音 將指定裝置設為靜音或取消靜音。
device.command.NextInput 切換至下一個輸入來源。
device.command.OnOff on 開啟或關閉裝置。
device.command.OpenClose openDirection
openPercent
設定裝置的開關狀態
device.command.PauseUnpause 暫停 暫停或取消暫停裝置運作。
device.command.PreviousInput 切換到上一個輸入來源。
device.command.Reboot 重新啟動裝置。
device.command.RelativeChannel channelCount 依相對量調整目前色版。
device.command.ReturnChannel 返回使用者先前所在的頻道。
device.command.ReverseFan 反轉風扇方向。
device.command.RotateAbsolute rotationDegrees
rotationPercent
設定裝置的絕對旋轉角度。
device.command.SelectChannel channelCode
channelName
channelNumber
將目前頻道設為特定值。
device.command.SetFanSpeed fanSpeed 設定風扇速度。
device.command.SetFanSpeedRelative fanSpeedRelativePercent
fanSpeedRelativeWeight
設定風扇的相對速度。
device.command.SetHumidity 濕度 將濕度設為絕對值。
device.command.SetInput newInput 設定媒體輸入。
device.command.SetVolume volumeLevel 設定指定裝置的音量。
device.command.StartStop start 啟動或停止裝置。
device.command.StopLightEffect 停止目前的燈光效果。
device.command.ThermostatSetMode thermostatMode 設定溫度控制器裝置的目標運作模式。
device.command.ThermostatTemperatureSetpoint thermostatTemperatureSetpoint 設定溫度控制器裝置的目標溫度。
device.command.ThermostatTemperatureSetRange thermostatTemperatureSetpointHigh
thermostatTemperatureSetpointLow
設定溫度控制器裝置的目標溫度範圍。
device.command.TimerAdjust 時間長度 調整計時器時間長度。
device.command.TimerCancel 取消計時器。
device.command.TimerPause 暫停計時器。
device.command.TimerResume 繼續使用計時器。
device.command.TimerStart 時間長度 啟動新的計時器。
device.event.AnimalOtherDetection 攝影機偵測到狗或貓。不支援偵測其他類型的動物。
device.event.DoorbellPress 有人按門鈴。
device.event.FaceFamiliarDetection 攝影機偵測到熟面孔。
device.event.FaceUnfamiliarDetection 攝影機偵測到陌生人。
device.event.MotionDetection 裝置偵測到動作。
device.event.MovingVehicleDetection 攝影機偵測到移動中的車輛。
device.event.PackageDelivered 攝影機偵測到有包裹送達。
device.event.PersonDetection 攝影機偵測到人物。
device.event.PersonTalking 裝置偵測到有人說話。
device.event.Sound 裝置偵測到聲響。
device.state.AppSelector currentApplication 適用於可在應用程式之間切換的裝置。
device.state.ArmDisarm currentArmLevel
isArmed
如果裝置支援啟動和解除功能 (例如保全系統),這項屬性會指出裝置是否已啟動。
device.state.Brightness 亮度 裝置的亮度設定。
device.state.Channel 適用於支援媒體裝置頻道的裝置。
device.state.ColorSetting color.colorTemperature
color.spectrumHsv.hue
color.spectrumHsv.saturation
color.spectrumHsv.value
color.spectrumRgb
顏色設定的狀態。
device.state.Cook currentCookingMode
currentFoodPreset
適用於可根據各種食物預設和支援的烹調模式烹調食物的裝置。
device.state.Dock isDocked 適用於可接收指令返回充電的自走式行動裝置。
device.state.EnergyStorage descriptiveCapacityRemaining
isCharging
isPluggedIn
電池等儲能裝置的狀態,包括儲存的能量、是否正在充電,以及是否已接上電源。
device.state.FanSpeed currentFanSpeedPercent
currentFanSpeedSetting
適用於支援設定風扇速度的裝置。
device.state.Fill currentFillLevel
currentFillPercent
isFilled
適用於可裝水的裝置,例如浴缸。
device.state.HumiditySetting humidityAmbientPercent
humiditySetpointPercent
適用於支援濕度設定的裝置,例如加濕器和除濕機。
device.state.InputSelector currentInput 啟用可切換輸入來源的查詢裝置。 媒體輸入內容可依裝置設定動態名稱,代表音訊或影片動態消息。這些動態饋給可以透過硬體或網路連線,但應命名並合理保留。不支援任意臨時動態饋給,例如可搜尋的網路程式庫。支援已配對且命名的藍牙來源。來源可以有多個名稱,因此支援使用者建立和探索的名稱,以及預設名稱;例如,「hdmi_1」也可能是「DVD 播放器」,或「usb_1」也可能是「硬碟」。 媒體輸入內容可排序,支援「下一首」和「上一首」指令。 注意:InputSelector 不支援查詢語法。
device.state.LightEffects activeLightEffect 適用於可支援複雜燈光指令來變更狀態的裝置,例如循環變換色彩。
device.state.LockUnlock isJammed
isLocked
適用於支援鎖定和解鎖,以及/或回報鎖定狀態的裝置。
device.state.MediaState playbackState 如果是播放媒體的裝置,則會顯示媒體狀態,例如是否正在播放。
device.state.MotionDetection motionDetectionEventInProgress 適用於可偵測動作的裝置。
device.state.OccupancySensing 可住人數 適用於可偵測有人在場的裝置,無論是透過 PIR、超音波或實體接觸感應。
device.state.Online 線上 適用於支援線上和離線狀態,以及/或回報線上和離線狀態的裝置。
device.state.OnOff 對 任何具有二進位開關功能的裝置 (包括插頭和開關,以及許多未來裝置) 的基本開關功能。
device.state.OpenClose openPercent 適用於支援開啟和關閉的裝置,在某些情況下,也支援部分開啟和關閉,或朝多個方向開啟和關閉。
device.state.Record isCurrentlyRecording 適用於支援錄製到媒體的裝置。
device.state.Rotation rotationDegrees
rotationPercent
適用於支援旋轉功能的裝置,例如葉片可旋轉的百葉窗。
device.state.RunCycle currentCycleRemainingTime
currentTotalRemainingTime
適用於可查詢作業持續時間的裝置。 這類裝置會在開始運作時回報總行程數,並在運作時回報目前所在的行程。
device.state.SensorState currentSensorStateData.key
currentSensorStateData.value.currentSensorState
currentSensorStateData.value.rawValue
感應器產生的測量結果。例如煙霧偵測器測得的煙霧量,或一氧化碳偵測器測得的一氧化碳量等。
device.state.StartStop isPaused
isRunning
適用於支援啟動和停止操作的裝置。 啟動和停止裝置的功能與開啟和關閉裝置類似,但裝置在開啟和啟動時的運作方式不同。舉例來說,某些洗衣機可以先開啟並修改設定,再實際開始運作。
device.state.TemperatureControl temperatureAmbient
temperatureSetpoint
控制溫度控制器以外裝置 (例如烤箱) 內部或周圍的溫度。
device.state.TemperatureSetting activeThermostatMode
thermostatHumidityAmbient
thermostatMode
thermostatTemperatureAmbient
thermostatTemperatureSetpoint
thermostatTemperatureSetpointHigh
thermostatTemperatureSetpointLow
適用於支援溫度點和模式的裝置。
device.state.Timer timerPaused 適用於支援計時器功能的裝置。舉例來說,智慧型灑水控制器或智慧型燈具開關可能內建計時器。這可用於向裝置查詢計時器剩餘時間。
device.state.Volume currentVolume
isMuted
適用於可變更音量的裝置 (例如將音量設為特定等級、靜音或取消靜音)。
home.command.Notification body
members
title
傳送通知到指定住家成員的電子郵件地址。
home.state.HomePresence homePresenceMode
not 代表另一個限制條件的邏輯 NOT 條件。
or 代表所有子項條件的邏輯 OR 複合條件。
time.between 代表日期範圍。
time.delay 在自動化執行過程插入暫停時段。
time.schedule 代表會在指定時間進行的活動。