Add encoding parameter to mqtt automation (#8247)

* Add encoding parameter to mqtt automation #20292

This is needed to trigger on received images/other byte payloads via mqtt because otherwise the decode fails. See also 
#16004

* Update trigger.markdown

clarify
This commit is contained in:
jmtatsch 2019-01-25 13:48:05 +01:00 committed by Franck Nijhof
parent 770908731f
commit 09cc247d49

View File

@ -46,7 +46,7 @@ automation:
### {% linkable_title MQTT trigger %}
Triggers when a specific message is received on given topic. Optionally can match on the payload being sent over the topic.
Triggers when a specific message is received on given topic. Optionally can match on the payload being sent over the topic. The default payload encoding is 'utf-8'. For images and other byte payloads use `encoding: ''` to disable payload decoding completely.
```yaml
automation:
@ -55,6 +55,7 @@ automation:
topic: living_room/switch/ac
# Optional
payload: 'on'
encoding: 'utf-8'
```
### {% linkable_title Numeric state trigger %}