ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
267 stars 34 forks source link

2023.7: Error while setting up monitor_docker platform for switch #128

Closed genem2 closed 12 months ago

genem2 commented 12 months ago

I'm guessing this might be an issue for this custom component, rather than HA, but let me know if that's not right.

With 2023.7, this now fails with the log entry shown below. Wondering it it's related to their blog post regarding: [Changes to entity naming]

2023-07-06 08:40:34.657 ERROR (MainThread) [homeassistant.components.switch] Error while setting up monitor_docker platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/monitor_docker/switch.py", line 78, in async_setup_platform
    api = hass.data[DOMAIN][name][API]
          ~~~~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'api'
ualex73 commented 12 months ago

I just upgraded my test HA to 2023.7.0, but it still works? Are you running it in docker or in another way?

genem2 commented 12 months ago

Yes, it's in docker on my unraid server. Edit: Also just verified the additional arguments I'm passing to the HA Docker: --restart on-failure -v /var/run/docker.sock:/var/run/docker.sock

Ha ha: Finally found where they hid this report:

System Information

version core-2023.7.0
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.36-Unraid
arch x86_64
timezone America/Los_Angeles
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.32.1 Stage | running Available Repositories | 1281 Downloaded Repositories | 47
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 2 -- | -- resources | 33 views | 8 mode | storage
Recorder oldest_recorder_run | June 22, 2023 at 12:42 PM -- | -- current_recorder_run | July 6, 2023 at 8:40 AM estimated_db_size | 45.48 MiB database_engine | sqlite database_version | 3.41.2
Sonoff version | 3.5.1 (122751c) -- | -- cloud_online | 11 / 15 local_online | 11 / 11
genem2 commented 12 months ago

Well, appears to be resolved with 2023.7.1