I’m new to HA, so please explain in detail if you can
I’m running on an RPi3, as I don’t need anything fancy.
It was easy to setup my Switchbot temperature sensors and put them on a graph. Now I want to get MQTT data onto a similar graph.
I’ve installed the MQTT addon, and used the test buttons on it to subscribe to a topic, and to publish data on that topic. ( The topic name is SummerHouse )
This ‘SummerHouse’ topic will eventually receive data from a remote Arduino or similar, and will contain just a number in the range 0 to 100, sent once per minute.
I want to plot these numbers in a statistics graph.
The key is to tell HA what the units are for the sensor, otherwise long term statistics may not plot a graph (as it doesn’t know what the value represents - even just a “number”).
I’d use the search on this forum as there are many posts about developing using MQTT including…
Maybe I need to explain my immediate requirement a little better.
The MQTT integration has test buttons for ‘Listen’ and ‘Publish’. If I set a topic name in both, and some number as the payload, then each time I press ‘Publish’ a message appears in the ‘Listen’ area showing the time of the message, the topic, and the payload value.
I’ve put some YAML in which I thought should create a sensor to access this topic, which would then let me use the payload in a graph.