Hi. Great to see a HACS compilement fork of the docker monitor integration!
RPi 4 running 64-bit Ubuntu Server.
Docker: 19.03.9, build 9d98839
Docker Compose: 1.21.0, build unknown
Home Assistant Core: 0.111.2
HACS: 1.1.0
Docker Monitor: 0.0.5
Installing through HACS went fine however I get this error while HA tries to setup the integration:
Logger: homeassistant.components.sensor
Source: custom_components/docker_monitor/sensor.py:328
Integration: Sensor (documentation, issues)
First occurred: 19.14.14 (1 occurrences)
Last logged: 19.14.14
Error while setting up docker_monitor platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity
entity.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state
self._async_write_ha_state() # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/config/custom_components/docker_monitor/sensor.py", line 328, in state_attributes
attributes[ATTR_IMAGE] = stats['info']['image'][0]
IndexError: list index out of range
This is my setup in configuration.yaml. I'm going for the default value of adding all containers and their states. When manually adding them, there is no issue.
As I'm running Home Assistant Core in Docker, I'm using Docker Compose, and this is my config where the docker socket is added as a volume.