Hi there - hopefully a quick question which might exist in documents somewhere. I’ve tried looking already but not entirely sure of what to search for.
Hoping someone can help.
I have a bunch of devices connected to HomeAssistant. Primarily Tuya smart bulbs, switches and Xaiomi temperature sensors.
I have configured MQTT broker.
I also have a separate InfluxDB set up which captures weather sensors from an outside weather stations.
I’m interested to see if I can configure devices to easily auto forward state changes onto the MQTT broker so that I can ingest them into InfluxDB and chart them over time.
One specific example: I have a dumb oil heater connected through a Tuya smart switch. I also have a Xaiomi temperature sensor in the room. I have automations set up to turn the heater on below a certain temperature and off when it goes above.
I’d love to:
a) Record the temperature from the sensor into MQTT
b) Record the state change of the switch (on/off)
So that I can see how often it is triggered and the effects of it over time.
I’m sure I can set up what I need for each sensor, but my question is “Is there an easy way to configure it to auto publish state changes of all sensors to MQTT topics based on a template?”
Thanks in advance