listener 1883 protocol mqtt acl_file /etc/mosquitto/acl.conf password_file /etc/mosquitto/passwd allow_anonymous false connection tls-bridge address {{ inventory_hostname }}:8883 bridge_cafile {{ tls_certs }}/ca.crt bridge_certfile {{ tls_certs }}/{{ inventory_hostname }}.crt bridge_keyfile {{ tls_private }}/{{ inventory_hostname }}.key {% for shelly in shellies %} {% if shelly['name'] | regex_search("^shellyplug-s-") %} topic power out 0 shellies/{{ shelly['name'] }}/relay/0/ home/{{ shelly['room'] }}/{{ shelly['device'] }}/ topic temperature out 0 shellies/{{ shelly['name'] }}/ home/{{ shelly['room'] }}/{{ shelly['device'] }}/ {% else %} topic # out 0 shellies/{{ shelly['name'] }}/ home/{{ shelly['room'] }}/{{ shelly['device'] }}/ {% endif %} {% endfor %}