Skip to content

Commit

Permalink
> 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
miaucl committed Sep 7, 2024
1 parent d3ab7e9 commit e4399d3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 2.0.1

* Fix white- and blacklist config via docker env where and empty string resulted in a pass-all regex overwriting the blacklist.

## 2.0.0

* Rework of the complete structure, but no functional changes.
2 changes: 1 addition & 1 deletion docker2mqtt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""docker2mqtt package."""

__VERSION__ = "2.0.0"
__VERSION__ = "2.0.1"

from .const import (
ANSI_ESCAPE,
Expand Down
9 changes: 5 additions & 4 deletions docker2mqtt/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
if __name__ == "__main__":
# Env config

whitelist = environ.get("CONTAINER_WHITELIST", "")
blacklist = environ.get("CONTAINER_BLACKLIST", "")

cfg = Docker2MqttConfig(
{
"log_level": environ.get("LOG_LEVEL", LOG_LEVEL_DEFAULT),
Expand All @@ -53,10 +56,8 @@
"MQTT_TOPIC_PREFIX", MQTT_TOPIC_PREFIX_DEFAULT
),
"mqtt_qos": int(environ.get("MQTT_QOS", MQTT_QOS_DEFAULT)),
"container_whitelist": environ.get("CONTAINER_WHITELIST", "").split(",")
or [],
"container_blacklist": environ.get("CONTAINER_BLACKLIST", "").split(",")
or [],
"container_whitelist": whitelist.split(",") if len(whitelist) > 0 else [],
"container_blacklist": blacklist.split(",") if len(blacklist) > 0 else [],
"enable_events": bool(environ.get("EVENTS", EVENTS_DEFAULT)),
"enable_stats": bool(environ.get("STATS", STATS_DEFAULT)),
"stats_record_seconds": int(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = docker2mqtt
version = 2.0.0
version = 2.0.1
author = Cyrill Raccaud
author_email = [email protected]
description = Send your docker stats and and events to mqtt and discovery them in home assistant.
Expand Down

0 comments on commit e4399d3

Please sign in to comment.