From 31d387bb89f00b5e6d537b229694a770869b2cf9 Mon Sep 17 00:00:00 2001 From: Tommy Long <35182132+tommyjlong@users.noreply.github.com> Date: Sat, 8 Jun 2019 05:19:51 -0400 Subject: [PATCH] Add templating to MQTT Cover tilt_status_topic (#9578) --- source/_components/cover.mqtt.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_components/cover.mqtt.markdown b/source/_components/cover.mqtt.markdown index acf37e99e42..6542d85615f 100644 --- a/source/_components/cover.mqtt.markdown +++ b/source/_components/cover.mqtt.markdown @@ -144,6 +144,10 @@ tilt_status_topic: description: The MQTT topic subscribed to receive tilt status update values. required: false type: string +tilt_status_template: + description: "Defines a [template](/topics/templating/) that can be used to extract the payload for the `tilt_status_topic` topic. " + required: false + type: string tilt_min: description: The minimum tilt value. required: false @@ -306,6 +310,7 @@ cover: value_template: '{{ value.x }}' tilt_command_topic: 'home-assistant/cover/tilt' tilt_status_topic: 'home-assistant/cover/tilt-state' + tilt_status_template: '{{ value_json["PWM"]["PWM1"] }}' tilt_min: 0 tilt_max: 180 tilt_closed_value: 70