内置意图
以下意图是支持的:
- HassTurnOn, HassTurnOff, HassGetState, HassNevermind, HassRespond, HassBroadcast, HassSetPosition, HassGetCurrentDate, HassGetCurrentTime, HassLightSet, HassClimateSetTemperature, HassClimateGetTemperature, HassShoppingListAddItem, HassGetWeather, HassListAddItem, HassVacuumStart, HassVacuumReturnToBase, HassMediaPause, HassMediaUnpause, HassMediaNext, HassMediaPrevious, HassSetVolume, HassStartTimer, HassCancelAllTimers, HassCancelTimer, HassIncreaseTimer, HassDecreaseTimer, HassPauseTimer, HassUnpauseTimer, HassTimerStatus
以下意图是已弃用的:
- HassOpenCover, HassCloseCover, HassToggle, HassHumidifierSetpoint, HassHumidifierMode, HassShoppingListLastItems
槽位
对于 HassTurnOn 和 HassTurnOff,槽位是可选的。
可能的槽位组合是:
槽位组合 | 示例 |
---|---|
仅名称 | 餐桌灯 |
仅区域 | 厨房 |
区域和名称 | 客厅阅读灯 |
区域和 域 | 厨房灯 |
区域和设备类型 | 浴室湿度 |
设备类型和域 | 二氧化碳传感器 |
支持的意图
HassTurnOn
Turns on a device or entity
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
- domain - Domain of devices/entities in an area
- device_class - Device class of devices/entities in an area
HassTurnOff
Turns off a device or entity
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
- domain - Domain of devices/entities in an area
- device_class - Device class of devices/entities in an area
HassGetState
Gets or checks the state of an entity
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
- domain - Domain of devices/entities in an area
- device_class - Device class of devices/entities in an area
- state - Name of state to match
HassNevermind
Does nothing. Used to cancel a request
HassRespond
Returns response but takes no action
- response - Text to respond with
HassBroadcast
Announces a message on other satellites
- message - Message to broadcast (必填)
HassSetPosition
Sets the position of an entity
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
- domain - Domain of devices/entities in an area
- device_class - Device class of devices/entities in an area
- position - Position from 0 to 100 (必填)
HassGetCurrentDate
Gets the current date
HassGetCurrentTime
Gets the current time
HassLightSet
Sets the brightness or color of a light
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
- brightness - Brightness percentage from 0 to 100
- color - Name of color
HassClimateSetTemperature
Sets the desired indoor temperature
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
- temperature - Temperature in degrees (必填)
HassClimateGetTemperature
Gets the indoor temperature
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
HassShoppingListAddItem
Adds an item to the shopping list
- item - Item to add (必填)
HassGetWeather
Gets the current weather
- name - Name of the weather entity to use
HassListAddItem
Adds an item to a todo list
- item - Item to add (必填)
- name - Name of the list (必填)
HassVacuumStart
Starts a vacuum
- name - Name of a device or entity
- area - Name of an area
- floor - Name of a floor
HassVacuumReturnToBase
Returns a vacuum to base
- name - Name of a device or entity
- area - Name of an area
HassMediaPause
Pauses a media player
- name - Name of a device or entity
- area - Name of an area
HassMediaUnpause
Unpauses a media player
- name - Name of a device or entity
- area - Name of an area
HassMediaNext
Skips a media player to the next item
- name - Name of a device or entity
- area - Name of an area
HassMediaPrevious
Skips a media player back to the previous item
- name - Name of a device or entity
- area - Name of an area
HassSetVolume
Sets the volume of a media player
- name - Name of a device or entity
- area - Name of an area
- volume_level - Volume level from 0 to 100 (必填)
HassStartTimer
Starts a timer
- hours - Number of hours
- minutes - Number of minutes
- seconds - Number of seconds
- name - Name attached to the timer
- conversation_command - Command to execute when timer finishes
HassCancelAllTimers
Cancels all timers
- area - Area of the device used to start the timer
HassCancelTimer
Cancels a timer
- start_hours - Hours the timer was started with
- start_minutes - Minutes the timer was started with
- start_seconds - Seconds the timer was started with
- name - Name attached to the timer
- area - Area of the device used to start the timer
HassIncreaseTimer
Adds time to a timer
- hours - Number of hours
- minutes - Number of minutes
- seconds - Number of seconds
- start_hours - Hours the timer was started with
- start_minutes - Minutes the timer was started with
- start_seconds - Seconds the timer was started with
- name - Name attached to the timer
- area - Area of the device used to start the timer
HassDecreaseTimer
Removes time from a timer
- hours - Number of hours
- minutes - Number of minutes
- seconds - Number of seconds
- start_hours - Hours the timer was started with
- start_minutes - Minutes the timer was started with
- start_seconds - Seconds the timer was started with
- name - Name attached to the timer
- area - Area of the device used to start the timer
HassPauseTimer
Pauses a running timer
- start_hours - Hours the timer was started with
- start_minutes - Minutes the timer was started with
- start_seconds - Seconds the timer was started with
- name - Name attached to the timer
- area - Area of the device used to start the timer
HassUnpauseTimer
Resumes a paused timer
- start_hours - Hours the timer was started with
- start_minutes - Minutes the timer was started with
- start_seconds - Seconds the timer was started with
- name - Name attached to the timer
- area - Area of the device used to start the timer
HassTimerStatus
Reports status of one or more timers
- start_hours - Hours the timer was started with
- start_minutes - Minutes the timer was started with
- start_seconds - Seconds the timer was started with
- name - Name attached to the timer
- area - Area of the device used to start the timer
已弃用的意图
这些是旧意图,不支持模板匹配句子,并计划被移除或替换。
HassOpenCover
已弃用;请改用 HassTurnOn
。
打开遮盖。
槽位名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 是 | 要打开的遮盖实体的名称。 |
HassCloseCover
已弃用;请改用 HassTurnOff
。
关闭遮盖。
槽位名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 是 | 要关闭的遮盖实体的名称。 |
HassToggle
切换实体的状态。
槽位名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 是 | 要切换的实体的名称。 |
HassHumidifierSetpoint
设置目标湿度。
槽位名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 是 | 要控制的实体的名称。 |
humidity | integer, 0-100 | 是 | 要设置的目标湿度。 |
HassHumidifierMode
如果加湿器支持,设置加湿器模式。
槽位名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | string | 是 | 要控制的实体的名称。 |
mode | string | 是 | 要切换到的模式。 |
HassShoppingListLastItems
列出购物清单上的最后 5 个项目。
此意图没有槽位。