fix: ignore hubitat if prefixes is set to empty string

This commit is contained in:
Keenan Tims 2025-03-09 01:14:47 -08:00
parent 38006566af
commit cc4e1503f6
Signed by: ktims
GPG Key ID: 11230674D69038D4
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@ -983,7 +983,7 @@ dependencies = [
[[package]]
name = "mqtt-exporter"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"backoff",
"bytes",

View File

@ -1,6 +1,6 @@
[package]
name = "mqtt-exporter"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
[dependencies]

View File

@ -346,7 +346,7 @@ impl App {
&config.esphome_topic_prefixes,
)))
}
if !config.hubitat_topic_prefixes.is_empty() {
if !config.hubitat_topic_prefixes.is_empty() && !config.hubitat_topic_prefixes[0].is_empty() {
transformers.push(Box::new(HubitatNormalize::new(
&config.hubitat_topic_prefixes,
)))