I have no idea to access this entity within the MQTT integration. The payload can be observed by “MQTT config - listen to a topic”. Also with MQTT explorer. However, it is not recognized by MQTT as a new entity.
Any hint is welcome!
Cheers Uli
In MQTT Explorer it looks similar (the payloads are integers) and each sensor is a seperate topic.
The data of the sensor is available, however I found no way to get it as an entity of the MQTT integration.
Cheers Uli
It looks like I have the same problem regarding a single data value published to an MQTT broker by a Tasmota device. A rule running on the Tasmota device publishes the data as a single topic:value pair. Unlike other topic messages with many components that display within “{ }” in JSON format the “Listen to a topic” feature displays the data just like what K shows in the screencopy. It shows the topic followed by the data value on a single line with no “{ }” or any punctuation characters
The configuration.yaml uses a similar setup as K shows. HA shows an MQTT integration entity corresponding to the configuration.yaml entry, but the entity has an unavailable status.
Incidentally I find the MQTT integration configuration discovery fail to discover anything regardless of what the prefix setting is. I am using MQTT Explorer to view the traffic. MQTT shows the published data in the same way as “Listen to a topic” shows the data.
Hello,
I first changed the value_template and in a second step I commented it out - however no change - still no change in the number of the entities of integration MQTT. How did you made use of the new measured value?
Cheers
Uli
Solved:
With this data inside configuration.yaml it finally works. The unique_id is essential to access and use it inside Home Assistant. An additional weakness of the sensor is, that it truncates the length of the state_topic string. It must include a individual name, the keyword “sensor” and the names of the measured values. I started with co2_meter instead of co2m - and this kicked off the individual names of the measured values. So trivial!