From 807e23217200277cde243fcf3e08bd578d62192e Mon Sep 17 00:00:00 2001 From: tomlut <10679300+tomlut@users.noreply.github.com> Date: Tue, 11 Aug 2020 03:48:07 +1000 Subject: [PATCH] Add quotes to the payload_template example. (#14206) The payload_template example was missing enclosing quotes. Confirmed that this is required. `payload_template: {{ states('sun.sun') }}` causes the service call to fail, ("value should be string for dictionary value"). `payload_template: "{{ states('sun.sun') }}"` publishes correctly --- source/_docs/mqtt/service.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_docs/mqtt/service.markdown b/source/_docs/mqtt/service.markdown index f848093a169..c5b78436cfb 100644 --- a/source/_docs/mqtt/service.markdown +++ b/source/_docs/mqtt/service.markdown @@ -28,7 +28,7 @@ payload: on {% raw %} ```yaml topic: home-assistant/light/1/state -payload_template: {{ states('device_tracker.paulus') }} +payload_template: "{{ states('device_tracker.paulus') }}" ``` {% endraw %}