mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
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
This commit is contained in:
parent
38ee7392c4
commit
d2c7a2fe77
@ -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 %}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user