diff --git a/README.md b/README.md index d0f2d8a..d9f9cff 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ docker_monitor: | --------------------------------- | ------------------------------- | ----- | | utilization_version | Docker version | - | | container_status | Container status | - | -| container_up_time | Container start time | - | +| container_uptime | Container start time | - | | container_image | Container image | - | | container_cpu_percentage_usage | CPU usage | % | | container_memory_usage | Memory usage | MB | diff --git a/custom_updater.json b/custom_updater.json index a1b6b81..226190e 100644 --- a/custom_updater.json +++ b/custom_updater.json @@ -1,7 +1,7 @@ { "docker_monitor": { "updated_at": "2019-02-19", - "version": "0.0.2", + "version": "0.0.3", "local_location": "custom_components/docker_monitor/__init__.py", "remote_location": "https://raw.githubusercontent.com/Sanderhuisman/home-assistant-custom-components/master/docker_monitor/__init__.py", "changelog": "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", @@ -9,7 +9,7 @@ }, "docker_monitor.sensor": { "updated_at": "2019-02-19", - "version": "0.0.2", + "version": "0.0.3", "local_location": "custom_components/docker_monitor/sensor.py", "remote_location": "https://raw.githubusercontent.com/Sanderhuisman/home-assistant-custom-components/master/docker_monitor/sensor.py", "changelog": "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", @@ -17,7 +17,7 @@ }, "docker_monitor.switch": { "updated_at": "2019-02-19", - "version": "0.0.2", + "version": "0.0.3", "local_location": "custom_components/docker_monitor/switch.py", "remote_location": "https://raw.githubusercontent.com/Sanderhuisman/home-assistant-custom-components/master/docker_monitor/switch.py", "changelog": "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", @@ -25,7 +25,7 @@ }, "eetlijst.sensor": { "updated_at": "2019-02-19", - "version": "0.0.2", + "version": "0.0.3", "local_location": "custom_components/sensor/eetlijst.py", "remote_location": "https://raw.githubusercontent.com/Sanderhuisman/home-assistant-custom-components/master/sensor/eetlijst.py", "changelog": "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", @@ -33,7 +33,7 @@ }, "luftdaten.sensor": { "updated_at": "2019-02-19", - "version": "0.0.2", + "version": "0.0.3", "local_location": "custom_components/sensor/luftdaten_cu.py", "remote_location": "https://raw.githubusercontent.com/Sanderhuisman/home-assistant-custom-components/master/sensor/luftdaten_cu.py", "changelog": "https://github.com/Sanderhuisman/home-assistant-custom-components/releases/latest", diff --git a/docker_monitor/__init__.py b/docker_monitor/__init__.py index d372f27..e912b0f 100644 --- a/docker_monitor/__init__.py +++ b/docker_monitor/__init__.py @@ -23,7 +23,7 @@ from homeassistant.helpers.discovery import load_platform from homeassistant.util import slugify as util_slugify -VERSION = '0.0.2' +VERSION = '0.0.3' REQUIREMENTS = ['docker==3.7.0', 'python-dateutil==2.7.5'] @@ -167,6 +167,7 @@ def __init__(self, base_url): self._containers = {} self._event_callback_listeners = [] + self._events = None try: self._client = docker.DockerClient(base_url=self._base_url) @@ -181,7 +182,8 @@ def __init__(self, base_url): def exit(self): _LOGGER.info("Stopping threads for Docker monitor") - self._events.close() + if self._events: + self._events.close() for container in self._containers.values(): container.exit() diff --git a/docker_monitor/sensor.py b/docker_monitor/sensor.py index 77f56b8..5ff4af7 100644 --- a/docker_monitor/sensor.py +++ b/docker_monitor/sensor.py @@ -39,7 +39,7 @@ UTILISATION_MONITOR_VERSION ) -VERSION = '0.0.2' +VERSION = '0.0.3' DEPENDENCIES = ['docker_monitor'] diff --git a/docker_monitor/switch.py b/docker_monitor/switch.py index 200dc05..f3d52c0 100644 --- a/docker_monitor/switch.py +++ b/docker_monitor/switch.py @@ -25,7 +25,7 @@ DOCKER_HANDLE ) -VERSION = '0.0.2' +VERSION = '0.0.3' DEPENDENCIES = ['docker_monitor'] diff --git a/sensor/eetlijst.py b/sensor/eetlijst.py index e67369f..9bf4a18 100755 --- a/sensor/eetlijst.py +++ b/sensor/eetlijst.py @@ -23,7 +23,7 @@ from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle -VERSION = '0.0.2' +VERSION = '0.0.3' REQUIREMENTS = ['beautifulsoup4==4.7.0'] diff --git a/sensor/luftdaten_cu.py b/sensor/luftdaten_cu.py index 534b631..a9b71f1 100755 --- a/sensor/luftdaten_cu.py +++ b/sensor/luftdaten_cu.py @@ -23,7 +23,7 @@ from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle -VERSION = '0.0.2' +VERSION = '0.0.3' _LOGGER = logging.getLogger(__name__)