Skip to content

Commit

Permalink
Fixed: Containers didn't default to all, when left empty (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ualex73 committed Jun 19, 2020
1 parent 6c7eff2 commit 1fc55f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/monitor_docker/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
clist = api.list_containers()

for cname in clist:
if cname in config[CONF_CONTAINERS]:
if cname in config[CONF_CONTAINERS] or not config[CONF_CONTAINERS]:
# Try to figure out if we should include any network sensors
capi = api.get_container(cname)
info = capi.get_info()
Expand Down
2 changes: 1 addition & 1 deletion custom_components/monitor_docker/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
clist = api.list_containers()

for cname in clist:
if cname in config[CONF_CONTAINERS]:
if cname in config[CONF_CONTAINERS] or not config[CONF_CONTAINERS]:
_LOGGER.debug("%s: Adding component Switch", cname)

switches.append(
Expand Down

0 comments on commit 1fc55f5

Please sign in to comment.