LaggAt / hacs-govee

A HACS repository for Govee light integration
MIT License
270 stars 63 forks source link

Detected blocking call to load_verify_locations Warning in Home Assistant Log #178

Open olddawgpowers opened 1 month ago

olddawgpowers commented 1 month ago

Version of the custom_component

Core 2024.10.2 Supervisor 2024.10.0 Operating System 13.1 Frontend 20241002.3 Govee Integration 2023.11.1

Add your logs here.

2024-10-13 13:37:55.413 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7f92fd01bc50>, '/usr/local/lib/python3.12/site-packages/certifi/cacert.pem', None, None) inside the event loop by custom integration 'govee' at custom_components/govee/init.py, line 53: hub = await Govee.create( (offender: /usr/local/lib/python3.12/ssl.py, line 708: context.load_verify_locations(cafile, capath, cadata)), please create a bug report at https://github.com/LaggAt/hacs-govee/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, self._args) File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/usr/src/homeassistant/homeassistant/setup.py", line 461, in _async_setup_component await asyncio.gather( File "/usr/src/homeassistant/homeassistant/setup.py", line 463, in create_eagertask( File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/govee/init.py", line 53, in async_setup_entry hub = await Govee.create( 2024-10-13 13:37:55.723 WARNING (MainThread) [custom_components.govee] API is back online. 2024-10-13 13:37:55.739 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/govee_learning.yaml',) inside the event loop by custom integration 'govee' at custom_components/govee/learning_storage.py, line 28: learned_dict = load_yaml(self._config_dir + LEARNING_STORAGE_YAML) (offender: /usr/src/homeassistant/homeassistant/util/yaml/loader.py, line 230: with open(fname, encoding="utf-8") as conf_file:), please create a bug report at https://github.com/LaggAt/hacs-govee/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/govee/init.py", line 64, in async_setupentry , err = await hub.get_devices() File "/usr/local/lib/python3.12/site-packages/govee_api_laggat/govee_api_laggat.py", line 312, in getdevices , err_api = await self._api.get_devices() File "/usr/local/lib/python3.12/site-packages/govee_api_laggat/api.py", line 244, in get_devices learning_infos = await self._govee._learning_storage._read_cached() File "/usr/local/lib/python3.12/site-packages/govee_api_laggat/learning_storage.py", line 30, in _read_cached self._learned_info = await self.read() File "/config/custom_components/govee/learning_storage.py", line 28, in read learned_dict = load_yaml(self._config_dir + LEARNING_STORAGE_YAML)

2024-10-13 13:37:55.751 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'govee' calls async_forward_entry_setup for integration, govee with title: govee and entry_id: 01JA3FYFA51CEX3ZM6RW39ETPT, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/govee/init.py, line 72: hass.async_create_task(, please create a bug report at https://github.com/LaggAt/hacs-govee/issues 2024-10-13 13:38:03.237 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.govee.light.GoveeLightEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 19> and color modes, please create a bug report at https://github.com/LaggAt/hacs-govee/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation 2024-10-13 13:38:03.238 WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.govee.light.GoveeLightEntity'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/LaggAt/hacs-govee/issues 2024-10-13 13:38:03.246 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.govee.light.GoveeLightEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 19> and color modes, please create a bug report at https://github.com/LaggAt/hacs-govee/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation 2024-10-13 13:38:03.246 WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.govee.light.GoveeLightEntity'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/LaggAt/hacs-govee/issues 2024-10-13 13:38:03.248 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.govee.light.GoveeLightEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 19> and color modes, please create a bug report at https://github.com/LaggAt/hacs-govee/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation 2024-10-13 13:38:03.249 WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.govee.light.GoveeLightEntity'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/LaggAt/hacs-govee/issues 2024-10-13 13:38:03.252 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.govee.light.GoveeLightEntity'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 19> and color modes, please create a bug report at https://github.com/LaggAt/hacs-govee/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation 2024-10-13 13:38:03.253 WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.govee.light.GoveeLightEntity'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/LaggAt/hacs-govee/issues 2024-10-13 13:38:03.262 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration govee with title: govee and entry_id: 01JA3FYFA51CEX3ZM6RW39ETPT, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue. Stack (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2223, in async_forward_entry_setup _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup") File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1192, in _report_non_awaited_platform_forwards report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 155, in report _LOGGER.warning(msg, stack_info=True)

Describe the bug

A clear and concise description of what the bug is. Several Warnings on the current Govee Integration

Debug log


Add your logs here.