From 09cc247d496902509b97c4f4aa8554fae9c5e05b Mon Sep 17 00:00:00 2001 From: jmtatsch Date: Fri, 25 Jan 2019 13:48:05 +0100 Subject: [PATCH] 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 --- source/_docs/automation/trigger.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 6a084964d8c..6b3868bf5b4 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -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 %}