From d2c7a2fe772c5209cac8b446fc02cdb5d35ed010 Mon Sep 17 00:00:00 2001 From: Alexis Iglauer Date: Fri, 6 Apr 2018 19:50:23 +0200 Subject: [PATCH] Update sensor.mqtt.markdown to add initial slashes for ESPEasy (#4757) * Update sensor.mqtt.markdown The sensors topic required the initial slashes to function in my installation. * Make it more clear * Remove tab --- source/_components/sensor.mqtt.markdown | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/_components/sensor.mqtt.markdown b/source/_components/sensor.mqtt.markdown index dc835ac9d7f..f84296bd861 100644 --- a/source/_components/sensor.mqtt.markdown +++ b/source/_components/sensor.mqtt.markdown @@ -167,7 +167,12 @@ sensor: ### {% linkable_title Get sensor value from a device with ESPEasy %} -Assuming that you have flashed your ESP8266 unit with [ESPEasy](https://github.com/letscontrolit/ESPEasy). Under "Config" set a name ("Unit Name:") for your device (here it's "bathroom"). A "Controller" for MQTT with the protocol "OpenHAB MQTT" is present and the entries ("Controller Subscribe:" and "Controller Publish:") are adjusted to match your needs. In this example the topics are prefixed with "home". Also, add a sensor in the "Devices" tap with the name "analog" and "brightness" as value. +Assuming that you have flashed your ESP8266 unit with [ESPEasy](https://github.com/letscontrolit/ESPEasy). Under "Config" set a name ("Unit Name:") for your device (here it's "bathroom"). A "Controller" for MQTT with the protocol "OpenHAB MQTT" is present and the entries ("Controller Subscribe:" and "Controller Publish:") are adjusted to match your needs. In this example the topics are prefixed with "home". Please keep in mind that the ESPEasy default topics start with a `/` and only contain the name when writing your entry for the `configuration.yaml` file. + +- **Controller Subscribe**: `home/%sysname%/#` (instead of `/%sysname%/#`) +- **Controller Publish**: `home/%sysname%/%tskname%/%valname%` (instead of `/%sysname%/%tskname%/%valname%`) + +Also, add a sensor in the "Devices" tap with the name "analog" and "brightness" as value. As soon as the unit is online, you will get the state of the sensor. @@ -188,5 +193,3 @@ sensor: name: Brightness ``` {% endraw %} - -