Refactor mqtt topics for shelly plugs
This commit is contained in:
parent
95c66d976f
commit
d6cc79dcb3
3 changed files with 10 additions and 5 deletions
|
@ -12,5 +12,10 @@ 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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue