You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It is not possible to get mqtt topic from subscribe wildcards at MQTT Subscribe Text Sensor.
It would be useful to get the last payload correct topic.
Some other pepeople interested in this feature:
https://community.home-assistant.io/t/it-is-possible-to-get-mqtt-topic-from-subscribe-wildcards/369662
Example Yaml:
name: "MQTT Logger"
id: mqtt_logger
topic: workroom/workroom/toggle/+
on_value:
then:
lambda: |-
ESP_LOGD("custom", "MY DATA %s", id(mqtt_logger).state.c_str());
ESP_LOGD("custom", "MY TOPIC %s", id(mqtt_logger).topic_get.c_str());
A documetation link:
https://github.com/esphome/esphome-docs/blob/a62d7ab193c1a464ed791670170c7d518189109b/components/text_sensor/mqtt_subscribe.rst#L54
Ps.: I tried to open a pull request.
But i always get that answer: Pull request creation failed. Validation failed: must be a collaborator
I created a simple fork for that.
https://github.com/Hsxsky/esphome-MQTT-Subscribe-get-topic
Beta Was this translation helpful? Give feedback.
All reactions