Guys,
I am trying to publish multiple Climate Sensors to MQTT to enable Other systems to consume and operate on the information.
I have found a number of posts but can not quite get to the end goal
What i have in my automations now is
trigger:
platform: time_pattern
minutes: '/1'
seconds: 00
action:
- service: mqtt.publish
data:
topic: /HomeAssistant/Airtouch/Temperature/Camryn
payload_template: '{{states.climate.camryn.attributes.current_temperature}}'
And this is working to publish a Single sensor to a distinct topic.
I can not work out how to publish multiple sensors to multiple topics - effectively duplicating the data section as such
topic: /HomeAssistant/Airtouch/Temperature/Kitchen
payload_template: ‘{{states.climate.kitchen.attributes.current_temperature}}’
topic: /HomeAssistant/Airtouch/Temperature/Study
payload_template: ‘{{states.climate.study.attributes.current_temperature}}’
etc etc
Can anyone give me an idea of how to either loop through a list of these entities or (as there are currently only 5 of them) just hard code all 5 and have them published each minute ?
Thanks
Craig