I want to create a automation that publish which publish the current temperature and last_changed- timestamp to MQTT each time a temperature change. I want to have one automation which handle several sensors.
Questions:
- How can I put a variable for sensorname/ entity for the sensor that triggered the rule as a part of topic-path.
- how can I retrieve the current value and the last_updated-timestamp for the actual sensor in the payload