Refactor mqtt topics for shelly plugs

This commit is contained in:
Timo Makinen 2025-04-05 17:37:56 +00:00
parent 95c66d976f
commit d6cc79dcb3
3 changed files with 10 additions and 5 deletions

View file

@ -10,7 +10,7 @@
tls_cert = "{{ tls_certs }}/{{ inventory_hostname }}.crt"
tls_key = "{{ tls_private }}/{{ inventory_hostname }}.key"
topics = [
"+/+/+/relay/0/power",
"+/+/+/power",
"+/+/+/temperature",
"+/+/+/sensor/battery",
"+/+/+/sensor/lux",
@ -21,9 +21,9 @@
data_format = "value"
[[inputs.mqtt_consumer.topic_parsing]]
topic = "+/+/+/relay/0/power"
tags = "location/room/device/_/_/_"
measurement = "_/_/_/_/_/measurement"
topic = "+/+/+/power"
tags = "location/room/device/_"
measurement = "_/_/_/power"
[[inputs.mqtt_consumer.topic_parsing]]
topic = "+/+/+/temperature"