mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
MQTT vacuum send_command description (#9222)
* send_command description
* ✏️ Tweak
This commit is contained in:
parent
3571bf1b1f
commit
fca64625de
@ -50,12 +50,12 @@ retain:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
payload_turn_on:
|
payload_turn_on:
|
||||||
description: "The payload to send to the `command_topic` to begin the cleaning cycle."
|
description: The payload to send to the `command_topic` to begin the cleaning cycle.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: turn_on
|
default: turn_on
|
||||||
payload_turn_off:
|
payload_turn_off:
|
||||||
description: "The payload to send to the `command_topic` to turn the vacuum off."
|
description: The payload to send to the `command_topic` to turn the vacuum off.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: turn_off
|
default: turn_off
|
||||||
@ -89,7 +89,7 @@ battery_level_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
battery_level_template:
|
battery_level_template:
|
||||||
description: "Defines a [template](/topics/templating/) to define the battery level of the vacuum."
|
description: Defines a [template](/topics/templating/) to define the battery level of the vacuum.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
charging_topic:
|
charging_topic:
|
||||||
@ -97,7 +97,7 @@ charging_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
charging_template:
|
charging_template:
|
||||||
description: "Defines a [template](/topics/templating/) to define the charging state of the vacuum."
|
description: Defines a [template](/topics/templating/) to define the charging state of the vacuum.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
cleaning_topic:
|
cleaning_topic:
|
||||||
@ -105,7 +105,7 @@ cleaning_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
cleaning_template:
|
cleaning_template:
|
||||||
description: "Defines a [template](/topics/templating/) to define the cleaning state of the vacuum."
|
description: Defines a [template](/topics/templating/) to define the cleaning state of the vacuum.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
docked_topic:
|
docked_topic:
|
||||||
@ -113,7 +113,7 @@ docked_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
docked_template:
|
docked_template:
|
||||||
description: "Defines a [template](/topics/templating/) to define the docked state of the vacuum."
|
description: Defines a [template](/topics/templating/) to define the docked state of the vacuum.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
error_topic:
|
error_topic:
|
||||||
@ -121,7 +121,7 @@ error_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
error_template:
|
error_template:
|
||||||
description: "Defines a [template](/topics/templating/) to define potential error messages emitted by the vacuum."
|
description: Defines a [template](/topics/templating/) to define potential error messages emitted by the vacuum.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
fan_speed_topic:
|
fan_speed_topic:
|
||||||
@ -129,7 +129,7 @@ fan_speed_topic:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
fan_speed_template:
|
fan_speed_template:
|
||||||
description: "Defines a [template](/topics/templating/) to define the fan speed of the vacuum."
|
description: Defines a [template](/topics/templating/) to define the fan speed of the vacuum.
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
set_fan_speed_topic:
|
set_fan_speed_topic:
|
||||||
@ -211,7 +211,7 @@ vacuum:
|
|||||||
|
|
||||||
The above configuration for this component expects an MQTT protocol like the following.
|
The above configuration for this component expects an MQTT protocol like the following.
|
||||||
|
|
||||||
#### Basic Commands
|
#### {% linkable_title Basic Commands %}
|
||||||
|
|
||||||
MQTT topic: `vacuum/command`
|
MQTT topic: `vacuum/command`
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ Possible MQTT payloads:
|
|||||||
- `locate` - Locate the vacuum (typically by playing a song)
|
- `locate` - Locate the vacuum (typically by playing a song)
|
||||||
- `start_pause` - Toggle the vacuum between cleaning and stopping
|
- `start_pause` - Toggle the vacuum between cleaning and stopping
|
||||||
|
|
||||||
#### Set Fan Speed
|
#### {% linkable_title Set Fan Speed %}
|
||||||
|
|
||||||
MQTT topic: `vacuum/set_fan_speed`
|
MQTT topic: `vacuum/set_fan_speed`
|
||||||
|
|
||||||
@ -236,13 +236,41 @@ Possible MQTT payloads:
|
|||||||
- `high` - High fan speed
|
- `high` - High fan speed
|
||||||
- `max` - Max fan speed
|
- `max` - Max fan speed
|
||||||
|
|
||||||
#### Send Custom Command
|
#### {% linkable_title Send Custom Command %}
|
||||||
|
|
||||||
|
Vacuum send_command allows three parameters:
|
||||||
|
|
||||||
|
- entity_id
|
||||||
|
- command
|
||||||
|
- params - optional
|
||||||
|
|
||||||
|
If params are not provided it sends command as payload to MQTT send_command topic.
|
||||||
|
If params are provided service sends json as payload with such structure:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
'command': 'command',
|
||||||
|
'param1-key': 'param1-value'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Service trigger example:
|
||||||
|
```
|
||||||
|
- alias: Push command based on sensor
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: sensor.sensor
|
||||||
|
action:
|
||||||
|
service: vacuum.send_command
|
||||||
|
data:
|
||||||
|
entity_id: 'vacuum.vacuum_entity'
|
||||||
|
command: 'custom_command'
|
||||||
|
params:
|
||||||
|
- key: value
|
||||||
|
```
|
||||||
|
|
||||||
MQTT topic: `vacuum/send_command`
|
MQTT topic: `vacuum/send_command`
|
||||||
|
|
||||||
MQTT payload for `send_command` can be an arbitrary value handled by the vacuum's MQTT-enabled firmware.
|
#### {% linkable_title Status/Sensor Updates %}
|
||||||
|
|
||||||
#### Status/Sensor Updates
|
|
||||||
|
|
||||||
MQTT topic: `vacuum/state`
|
MQTT topic: `vacuum/state`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user