emontnemery / domoticz_mqtt_discovery

MQTT discovery plugin for Domoticz
MIT License
40 stars 27 forks source link

Parse ignored topics as empty list when the field is empty #37

Open dogtopus opened 3 years ago

dogtopus commented 3 years ago

Also prevent the ignore condition being unnecessarily checked multiple times.

emontnemery commented 3 years ago

Can you explain what problem this solves?

dogtopus commented 3 years ago

If Mode4 is an empty string, ignoredtopics will be an empty string and breaks the check later. It will ignore everything instead of nothing which doesn't seem to be desired behavior. Also setting Mode4 to a, (with a trailing comma) does similar thing.

The other change was just to prevent the field from being checked multiple times and pollute the log.