Fix documentation for new feature mqtt command templates (#17252)

This commit is contained in:
Jan Bouwhuis 2021-04-04 13:16:48 +02:00 committed by GitHub
parent 04c10a50aa
commit 6ca6a1d645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,6 +282,8 @@ fan:
speed_range_max: 100
```
{% raw %}}
This example demonstrates how to use command templates with JSON output.
```yaml
@ -295,7 +297,7 @@ fan:
oscillation_command_topic: "bedroom_fan/oscillation/set"
oscillation_command_template: "{ oscillation: '{{ value }}'}"
percentage_command_topic: "bedroom_fan/speed/percentage"
percentage_command_template: "{ percentage: {{ value }}}"
percentage_command_template: "{ percentage: '{{ value }}'}"
preset_mode_command_topic: "bedroom_fan/speed/preset_mode"
preset_mode_command_template: "{ preset_mode: '{{ value }}'}"
preset_modes:
@ -305,3 +307,5 @@ fan:
- "eco"
- "breeze"
```
{% endraw %}