Good afternoon All,
This must have been answered before and I am not good enough with my google searches.
But lets say I have value from a sensor and I want to publish to an mqtt topic ( not the system sent one ) but a completely new topic.
This fails of course, but for the life of me I cannot google a preferred way.
# BME 280 Sensor
- platform: bme280
address: 0x76
update_interval: $update_interval
temperature:
name: "Temperature"
id: bme280_temperature
interval:
- interval: 5s
then:
- mqtt.publish:
topic: /sensors/nodemcu-1/bmetemperature
payload: id(bme280_temperature).state
This produces : /sensors/nodemcu-1/bmetemperature id(bme280_temperature).state as expected.
How / What is the best way to turn the variable into a value that can be published.
Apologies if this is a real newbie question and you need to provide a How to Google link, but its a learning curve for me.
Thanks again