Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VeSync gets devices but no relevant entities #131781

Open
fennemaj opened this issue Nov 28, 2024 · 47 comments
Open

VeSync gets devices but no relevant entities #131781

fennemaj opened this issue Nov 28, 2024 · 47 comments

Comments

@fennemaj
Copy link

fennemaj commented Nov 28, 2024

The problem

I have three smart outlets that have been in HA for a couple of years now and recently (last few days) they became unavailable. I removed the integration and re-added it and all the entites came back, but a day later, the plugs were unavailable again so I removed it and re-added and it comes back with 3 devices but only one entity which is a power entity and comes back as unavailable. The other two plugs have no entities. When I tried it again with the debug on for the logging, then only two of the three devices were found and again only one entity which was unable to load. The goal would be to get back to how things were before where HA can at least have the ability to turn these plugs on and off again.

What version of Home Assistant Core has the issue?

core-2024.11.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

VeSync

Link to integration documentation on our website

https://www.home-assistant.io/integrations/vesync

Diagnostics information

2024-11-27 17:10:21.727 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration bhyve which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-11-27 17:10:21.734 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-11-27 17:10:21.737 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration wyzeapi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-11-27 17:10:36.233 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.265 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.269 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.274 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.295 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.299 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.305 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. 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/core.py", line 841, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.loop)
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 2295, in async_forward_entry_setup
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:36.619 WARNING (MainThread) [homeassistant.helpers.config_validation] The 'bhyve' option near /config/configuration.yaml:3 is deprecated, please remove it from your configuration
2024-11-27 17:10:37.382 WARNING (SyncWorker_1) [pyvesync.vesync] Error retrieving device list
2024-11-27 17:10:43.062 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:43.066 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:43.077 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:43.485 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:43.963 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:44.928 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home Assistant Cloud for xbox
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/xbox/init.py", line 48, in async_setup_entry
consoles: SmartglassConsoleList = await client.smartglass.get_console_list()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/provider/smartglass/init.py", line 54, in get_console_list
resp = await self._fetch_list("devices", params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/provider/smartglass/init.py", line 359, in _fetch_list
resp = await self.client.session.get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/client.py", line 86, in get
return await self.request(hdrs.METH_GET, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/client.py", line 60, in request
await self._auth_mgr.refresh_tokens()
File "/usr/src/homeassistant/homeassistant/components/xbox/api.py", line 28, in refresh_tokens
await self._oauth_session.async_ensure_token_valid()
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 531, in async_ensure_token_valid
new_token = await self.implementation.async_refresh_token(self.token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 103, in async_refresh_token
new_token = await self._async_refresh_token(token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cloud/account_link.py", line 142, in _async_refresh_token
new_token = await account_link.async_fetch_access_token(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/hass_nabucasa/account_link.py", line 122, in async_fetch_access_token
resp.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1158, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url='https://account-link.nabucasa.com/refresh_token/xbox'
2024-11-27 17:10:44.959 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:10:46.355 ERROR (MainThread) [homeassistant.util.logging] Exception in <function _process_media_source_platform at 0x7f6ce1eca0> when processing platform 'media_source': (, 'xbox', <module 'homeassistant.components.xbox.media_source' from '/usr/src/homeassistant/homeassistant/components/xbox/media_source.py'>)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/media_source/init.py", line 100, in _process_media_source_platform
hass.data[DOMAIN][domain] = await platform.async_get_media_source(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/xbox/media_source.py", line 42, in async_get_media_source
client = hass.data[DOMAIN][entry.entry_id]["client"]
~~~~~~~~~^^^^^^^^
KeyError: 'xbox'

2024-11-27 17:10:46.597 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.esphome_web_d7215c_lux_sensor (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'lux' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+esphome%22
2024-11-27 17:10:46.599 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.lux_sensor (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'lux' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+esphome%22
2024-11-27 17:10:46.792 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/assist_satellite/entity.py", line 345, in async_accept_pipeline_from_satellite
await self._pipeline_task
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/init.py", line 134, in async_pipeline_from_audio_stream
await pipeline_input.validate()
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1507, in validate
await asyncio.gather(*prepare_tasks)
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 845, in prepare_speech_to_text
raise SpeechToTextError(
homeassistant.components.assist_pipeline.error.SpeechToTextError: Pipeline error code=stt-provider-missing, message=No speech-to-text provider for: stt.faster_whisper_2
2024-11-27 17:10:47.578 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration wyzeapi with title: and entry_id: 94bc945830bbb34091ddab35aa63192b, 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 2318, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1194, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 156, in report
_LOGGER.warning(msg, stack_info=True)
2024-11-27 17:24:32.889 WARNING (MainThread) [aioesphomeapi.connection] esphome-web-d7215c @ 192.168.128.250: Connection error occurred: [Errno 104] Connection reset by peer
2024-11-27 18:05:37.831 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.landscape_lighting are missing or not currently available
2024-11-27 18:05:49.641 WARNING (MainThread) [homeassistant.components.switch.reproduce_state] Invalid state specified for switch.landscape_lighting: unavailable
2024-11-27 18:47:03.026 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:1395dc0e-cc4c-18f9-a424-fd19d99ec16c, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host='192.168.128.36', port=2870, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), OSError(113, "Connect call failed ('192.168.128.36', 2870)"))', None)
2024-11-27 18:47:12.242 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:139a613e-cc4c-18f9-b321-eb409dcf2dbe, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host='192.168.128.36', port=2870, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), OSError(113, "Connect call failed ('192.168.128.36', 2870)"))', None)
2024-11-27 18:47:14.749 WARNING (MainThread) [homeassistant.components.media_player] Updating dlna_dmr media_player took longer than the scheduled update interval 0:00:10
2024-11-27 18:47:14.750 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.hisense_tv is taking over 10 seconds
2024-11-27 19:14:55.691 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/init.py", line 211, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:14:55.703 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 680, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:14:55.711 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 138, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:14:55.716 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/switch/init.py", line 99, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:16:47.026 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/init.py", line 211, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:16:47.030 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 680, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:21:11.942 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/init.py", line 211, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:21:11.945 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 680, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:21:23.329 DEBUG (MainThread) [homeassistant.components.vesync.common] 3 VeSync outlets found
2024-11-27 19:35:29.935 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/init.py", line 211, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:35:29.939 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 680, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:35:51.366 DEBUG (MainThread) [homeassistant.components.vesync.common] 3 VeSync outlets found
2024-11-27 19:36:19.269 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/init.py", line 211, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:36:19.272 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 850, in async_unload
result = await component.async_unload_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 680, in async_unload_entry
return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-11-27 19:36:28.957 DEBUG (MainThread) [homeassistant.components.vesync.common] 3 VeSync outlets found

Example YAML snippet

No custom YAML for this, just trying to see the devices and relevant entities.

Anything in the logs that might be useful for us?

I thought it was interesting that the logs say 3 VeSync devices found but only loaded two.

Additional information

I can confirm that the VeSync devices show up and can be controlled both through the VeSync app and through Google Home and Alexa integrations. It seems to be something specific to HA from what I see.

@home-assistant
Copy link

Hey there @markperdue, @webdjoe, @TheGardenMonkey, @cdnninja, mind taking a look at this issue as it has been labeled with an integration (vesync) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vesync can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign vesync Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vesync documentation
vesync source
(message by IssueLinks)

@GOTAZ
Copy link

GOTAZ commented Dec 1, 2024

Hi, not sure if I should start a new one or add to this one. So I'll add and if need be start a new.
I had trouble with mt Vesync devices updating so I removed the integration and added it back. Now I only get 7 devices out of 11.
I logged into the Vesync app and changed my password in case there was something weird with that.
Core 2024.11.3
Supervisor 2024.11.4
Operating system 13.2
Frontend 20241106.2

Here is what is in my log

wyzeapi: Error on device update!
(ERROR) Lock - message first occured at 1:36:35PM and shows up twice.

Logger: homeassistant.components.lock
Source: helpers/entity_platform.py:728
integration: Lock (documentation, issues)
First occurred: 1:36:35 PM (2 occurrences)
Last logged: 1:36:35 PM

wyzeapi: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 728, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1302, in async_device_update
await self.async_update()
File "/config/custom_components/wyzeapi/token_manager.py", line 45, in inner_function
await func(*args, **kwargs)
File "/config/custom_components/wyzeapi/lock.py", line 152, in async_update
lock = await self._lock_service.update(self._lock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/lock_service.py", line 20, in update
device_info = await self._get_lock_info(lock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/base_service.py", line 499, in _get_lock_info
device_uuid = device.mac.split(".")[2]
~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

oddity, I turned on Enable debug logging and 2 devices went away. removed the integration and restarted. I now have 6.
If I go to the Entities page every entity shows Status as a red circle (not provided)

@cdnninja
Copy link
Contributor

cdnninja commented Dec 1, 2024

Hi, not sure if I should start a new one or add to this one. So I'll add and if need be start a new.

I had trouble with mt Vesync devices updating so I removed the integration and added it back. Now I only get 7 devices out of 11.

I logged into the Vesync app and changed my password in case there was something weird with that.

Core 2024.11.3

Supervisor 2024.11.4

Operating system 13.2

Frontend 20241106.2

Here is what is in my log

wyzeapi: Error on device update!

(ERROR) Lock - message first occured at 1:36:35PM and shows up twice.

Logger: homeassistant.components.lock

Source: helpers/entity_platform.py:728

integration: Lock (documentation, issues)

First occurred: 1:36:35 PM (2 occurrences)

Last logged: 1:36:35 PM

wyzeapi: Error on device update!

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 728, in _async_add_entity

await entity.async_device_update(warning=False)

File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1302, in async_device_update

await self.async_update()

File "/config/custom_components/wyzeapi/token_manager.py", line 45, in inner_function

await func(*args, **kwargs)

File "/config/custom_components/wyzeapi/lock.py", line 152, in async_update

lock = await self._lock_service.update(self._lock)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/lock_service.py", line 20, in update

device_info = await self._get_lock_info(lock)

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/base_service.py", line 499, in _get_lock_info

device_uuid = device.mac.split(".")[2]

              ~~~~~~~~~~~~~~~~~~~~~^^^

IndexError: list index out of range

oddity, I turned on Enable debug logging and 2 devices went away. removed the integration and restarted. I now have 6.

If I go to the Entities page every entity shows Status as a red circle (not provided)

That is a Wyze error. Not veseync.

@GOTAZ
Copy link

GOTAZ commented Dec 2, 2024 via email

@FidgetyRat
Copy link
Contributor

I commented on the other issue opened before this one that all my vesync devices are no unavailable and that there is an error regarding getting the device list on startup. Worked for years, now completely dead.

@GOTAZ
Copy link

GOTAZ commented Dec 2, 2024

Ok, looked again and see nothing about Vesync in logs. guess I was bleary eye from trying to figure it out.

@GOTAZ
Copy link

GOTAZ commented Dec 2, 2024

I commented on the other issue opened before this one that all my vesync devices are no unavailable and that there is an error regarding getting the device list on startup. Worked for years, now completely dead.

Yeah, I had to replace a plug/outlet and wanted to refresh to get HA to see the new one, now I've broken all of them. It retrieves 7 out of 11 devices, but everything in now unavailable/not reporting. Wondering if restoring from backup would help, at least I'd have the previous ones back.

@GOTAZ
Copy link

GOTAZ commented Dec 2, 2024

So I did a restore back to 2024.8.1 and the integration to Vesync failed, probably because I changed my password earlier today. So I restored back to this mornings backup and Yay, the previous Vesync devices were working. I could turn lights and fans off just like before......for about 5 minutes, then they all went unavailable again. :-(

@GOTAZ
Copy link

GOTAZ commented Dec 3, 2024

just to note, I checked my Google home setup and it's getting updates from Vesync.

@colby82
Copy link

colby82 commented Dec 11, 2024

I'm getting the same messaging in the logs as the OP.

I just spun up a new instance of Hass OS, coming from Home Assistant Core, and the air cleaners were all showing up with no issues and then all of the sudden today they are now unavailable.

2024-12-11 17:03:43.975 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 211, in async_unload_entry return await hass.data[DATA_COMPONENT].async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-12-11 17:03:43.976 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 680, in async_unload_entry return await hass.data[DATA_COMPONENT].async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-12-11 17:03:43.977 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 138, in async_unload_entry return await hass.data[DATA_COMPONENT].async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! 2024-12-11 17:03:43.978 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 99, in async_unload_entry return await hass.data[DATA_COMPONENT].async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded!

@colby82
Copy link

colby82 commented Dec 14, 2024

Reporting back that my missing entities were restored a few hours after my above comment. Maybe there was an issue with the Vesync servers, but happy they are back. Thanks for everyones work on this!

@GOTAZ
Copy link

GOTAZ commented Dec 14, 2024 via email

@iprak
Copy link
Contributor

iprak commented Dec 17, 2024

I was seeing my entities as unavailable so tried accessing them directly using a python app. The app reported this error message in device query request. The default update interval in pyvesync is 30 seconds so 3200 would have been enough for a day but then I recalled that I also have the mobile app running and maybe that caused me to cross the limit.

Current user's daily request quota has been used up. The quota formula is \"3200 + 1500 * user owned device number\". Please note that we may change the constant in the formula

@colby82
Copy link

colby82 commented Dec 17, 2024

Mine went unavailable yesterday but after doing a quick restart they all came back.

@fennemaj
Copy link
Author

Mine are still in the same state, they show up but no active entities.

@GOTAZ
Copy link

GOTAZ commented Dec 17, 2024

My problems started when I needed to replace one that failed. It has gone down hill from there. It would never pull the replacement device, then it will only pull 7 out of 11 devices. However even though the are retrieved, they are all unavailable to HA.

I've seen the comments about daily quota, if it was in fact this wouldn't they be available for a short time and then go down?
And to add to that, I have Google Home set up and it pulls the devices (even the replacement one) and they all work. In fact I had a couple simple automations that I had to move to Google Home because HA can't do them anymore.

@iprak
Copy link
Contributor

iprak commented Dec 17, 2024

I can't comment on other cases but my mobile app is also refusing to show the device and gives a message about contacting customer support. I just have one humidifier. Python test app is also failing with same error, so this does not seem related to HA.

@fennemaj
Copy link
Author

Not sure if this is of value to anyone (now or in the future) but I've been able to successfully take one of my VeSync smart plugs and get ESPHome installed on it and adopt it in through ESPHome instead. I have three total and I'm going to keep one as is, in case it's helpful for the devs here for troubleshooting and convert the other so it's functional in HA again.

@iprak
Copy link
Contributor

iprak commented Dec 17, 2024

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

@GOTAZ
Copy link

GOTAZ commented Dec 17, 2024

Not sure if this is of value to anyone (now or in the future) but I've been able to successfully take one of my VeSync smart plugs and get ESPHome installed on it and adopt it in through ESPHome instead. I have three total and I'm going to keep one as is, in case it's helpful for the devs here for troubleshooting and convert the other so it's functional in HA again.

you have a link to some directions? Thanks

@GOTAZ
Copy link

GOTAZ commented Dec 17, 2024

I can't comment on other cases but my mobile app is also refusing to show the device and gives a message about contacting customer support. I just have one humidifier. Python test app is also failing with same error, so this does not seem related to HA.

my vesync mobile app also works great. (as well as Google Home), just not HA

@GOTAZ
Copy link

GOTAZ commented Dec 17, 2024

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

I would be interested in this but cannot find a components folder. I have custom components, but nothing vesync in there. in fact I connected to my HA share and did a search for vesync*.* and found nothing. I went through several full backup files and didn't find it either. I'll go out to my HA server and look from it

@iprak
Copy link
Contributor

iprak commented Dec 17, 2024

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

I would be interested in this but cannot find a components folder. I have custom components, but nothing vesync in there. in fact I connected to my HA share and did a search for vesync*.* and found nothing. I went through several full backup files and didn't find it either. I'll go out to my HA server and look from it

This would be in the HA install. an alternative would be to dump vesync into custom_components and define a version in its manifest. HA will pick it over the stock component.

@fennemaj
Copy link
Author

you have a link to some directions? Thanks

Unfortunately there aren't really good directions. I'm planning on writing something up, probably as an Instructable when I get a chance and I'll be happy to share it with you.

@fennemaj
Copy link
Author

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

I'll definitely give it a try and share back what I'm seeing as well.

@fennemaj
Copy link
Author

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

This would be in the HA install. an alternative would be to dump vesync into custom_components and define a version in its manifest. HA will pick it over the stock component.

Is it possible to set the debug flag if I have HA running on a Raspberry Pi using the HA image? If not, what's the best way to grab vesync to be able to drop it into custom_components?

@iprak
Copy link
Contributor

iprak commented Dec 18, 2024

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

This would be in the HA install. an alternative would be to dump vesync into custom_components and define a version in its manifest. HA will pick it over the stock component.

Is it possible to set the debug flag if I have HA running on a Raspberry Pi using the HA image? If not, what's the best way to grab vesync to be able to drop it into custom_components?

This has to be done via code modification. You can download the core report as zip and then extract the homeassistant\components\vesync folder into custom_components folder into your HA config folder, modify manifest.config, edit code and restart. If all goes well, then you should see something like this indicating override of core component.
image
Delete custom_components\vesync and restart to go back to the stock component.

@GOTAZ
Copy link

GOTAZ commented Dec 18, 2024

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

I would be interested in this but cannot find a components folder. I have custom components, but nothing vesync in there. in fact I connected to my HA share and did a search for vesync*.* and found nothing. I went through several full backup files and didn't find it either. I'll go out to my HA server and look from it

This would be in the HA install. an alternative would be to dump vesync into custom_components and define a version in its manifest. HA will pick it over the stock component.

my line 36 is in the middle of platforms. on line 54 I have manager = Vesync....
should I make debug=Ture line 55?
Thanks

@GOTAZ
Copy link

GOTAZ commented Dec 18, 2024

just to note, I deleted the existing Vesync, copied the repository to my custom_components folder and restarted. I setup the integrations and it only pulled 7 out of the 11 devices again. I went through and was able to turn each one on/off. Then I clicked reload (integration) and poof they all went unavailable again.

@iprak
Copy link
Contributor

iprak commented Dec 18, 2024

If one is interested in debugging, then one can pass ,debug=True at line 36 where manager is created in components/vesync/_init__.py. This will start emitting inner debug messages from the python package pyvesync.

I would be interested in this but cannot find a components folder. I have custom components, but nothing vesync in there. in fact I connected to my HA share and did a search for vesync*.* and found nothing. I went through several full backup files and didn't find it either. I'll go out to my HA server and look from it

This would be in the HA install. an alternative would be to dump vesync into custom_components and define a version in its manifest. HA will pick it over the stock component.

my line 36 is in the middle of platforms. on line 54 I have manager = Vesync.... should I make debug=Ture line 55? Thanks

I was referring to this line which can be changed to manager = VeSync(username, password, time_zone, debug=True).

@iprak
Copy link
Contributor

iprak commented Dec 19, 2024

I sort of know what is reason behind the quota consumption.

This investigation is based on my single humidifier device which uses a custom VeSync integration and has a total of 6 sensor entities.

VeSync at one point was not part of HA and in that state it was based on DataUpdateCoordinator pattern where the coordinator invoked the Vesync instance to update all devices. That would have resulted in 1 webmethod call/device.

At some point VeSync moved to HA. The DataUpdateCoordinator pattern was discarded in favor of letting each entity update itself. All Vesync integration entities derive from VeSyncBaseEntity (part of this integration) which then calls device.update (device is the device instance in the pyvesync package) which makes the same webmethod call. But 6 entities means that at least 6 calls are made in quick succession.

The update repeats every 30 seconds.

This still should not have exceeded the limit specified in the error message "3200 + 1500 * user owned device number" but maybe that error message is outdated.

Anyway, this is definitely a degradation and I think this is why things start failing after a while.

The update method can be throttled using @Throttle but that doesn't feel like the right fix.

Perhaps the code owners ("@markperdue", "@webdjoe", "@TheGardenMonkey", "@cdnninja") could chime in on this.

@GOTAZ
Copy link

GOTAZ commented Dec 20, 2024

don't know what this means, but it sees my devices, but doesn't add them
2024-12-19 21:18:16.456 DEBUG (SyncWorker_4) [pyvesync.vesync] New device list initialized
2024-12-19 21:18:16.457 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named dog fan model ESW10-USA
2024-12-19 21:18:16.457 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown'
2024-12-19 21:18:16.459 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added
2024-12-19 21:18:16.459 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named hibiscus fan model ESW10-USA
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown'
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named Outside lights model ESW10-USA
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown'
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named Christmas tree model ESW10-USA
2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown'
2024-12-19 21:18:16.461 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added
2024-12-19 21:18:16.463 DEBUG (SyncWorker_4) [pyvesync.vesync] Start updating the device details one by one
2024-12-19 21:18:16.463 DEBUG (SyncWorker_4) [pyvesync.helpers] =======call_api=============================
2024-12-19 21:18:16.464 DEBUG (SyncWorker_4) [pyvesync.helpers] [post] calling '/15a/v1/device/devicedetail' api
2024-12-19 21:18:16.464 DEBUG (SyncWorker_4) [pyvesync.helpers] API call URL:
https://smartapi.vesync.com/15a/v1/device/devicedetail
2024-12-19 21:18:16.464 DEBUG (SyncWorker_4) [pyvesync.helpers] API call headers:

@iprak
Copy link
Contributor

iprak commented Dec 20, 2024

don't know what this means, but it sees my devices, but doesn't add them 2024-12-19 21:18:16.456 DEBUG (SyncWorker_4) [pyvesync.vesync] New device list initialized 2024-12-19 21:18:16.457 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named dog fan model ESW10-USA 2024-12-19 21:18:16.457 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown' 2024-12-19 21:18:16.459 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added 2024-12-19 21:18:16.459 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named hibiscus fan model ESW10-USA 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown' 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named Outside lights model ESW10-USA 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown' 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Unknown device named Christmas tree model ESW10-USA 2024-12-19 21:18:16.460 DEBUG (SyncWorker_4) [pyvesync.vesync] Error - 'VeSync' object has no attribute 'unknown' 2024-12-19 21:18:16.461 DEBUG (SyncWorker_4) [pyvesync.vesync] ESW10-USA device not added 2024-12-19 21:18:16.463 DEBUG (SyncWorker_4) [pyvesync.vesync] Start updating the device details one by one 2024-12-19 21:18:16.463 DEBUG (SyncWorker_4) [pyvesync.helpers] =======call_api============================= 2024-12-19 21:18:16.464 DEBUG (SyncWorker_4) [pyvesync.helpers] [post] calling '/15a/v1/device/devicedetail' api 2024-12-19 21:18:16.464 DEBUG (SyncWorker_4) [pyvesync.helpers] API call URL: https://smartapi.vesync.com/15a/v1/device/devicedetail 2024-12-19 21:18:16.464 DEBUG (SyncWorker_4) [pyvesync.helpers] API call headers:

The log indicates that your device is ESW10-USA which is not handled in the package pyvesync. This is the list of supported switches. Someone already submitted a request to handle this switch - webdjoe/pyvesync#61. The integrations wiki mentions that ESW10-USA is supported which would be incorrect.

@GOTAZ
Copy link

GOTAZ commented Dec 20, 2024 via email

@iprak
Copy link
Contributor

iprak commented Dec 20, 2024

I think it would be worth logging this as a separate issue. The integration wiki should match what the underlying package supports.

@cdnninja
Copy link
Contributor

I sort of know what is reason behind the quota consumption.

This investigation is based on my single humidifier device which uses a custom VeSync integration and has a total of 6 sensor entities.

VeSync at one point was not part of HA and in that state it was based on DataUpdateCoordinator pattern where the coordinator invoked the Vesync instance to update all devices. That would have resulted in 1 webmethod call/device.

At some point VeSync moved to HA. The DataUpdateCoordinator pattern was discarded in favor of letting each entity update itself. All Vesync integration entities derive from VeSyncBaseEntity (part of this integration) which then calls device.update (device is the device instance in the pyvesync package) which makes the same webmethod call. But 6 entities means that at least 6 calls are made in quick succession.

The update repeats every 30 seconds.

This still should not have exceeded the limit specified in the error message "3200 + 1500 * user owned device number" but maybe that error message is outdated.

Anyway, this is definitely a degradation and I think this is why things start failing after a while.

The update method can be throttled using @Throttle but that doesn't feel like the right fix.

Perhaps the code owners ("@markperdue", "@webdjoe", "@TheGardenMonkey", "@cdnninja") could chime in on this.

Great find. I recently added myself as code owner to help out on this. I don't know it crazy well and have been learning. I have some time over the next few days so I am poking around seeing if any key improvements can be made easily or if this needs a large refactor. I struggle with the architecture of this integration compared to the others I support.

@cdnninja
Copy link
Contributor

cdnninja commented Dec 24, 2024

From my take on logs 30 seconds will exceed the call count.

I read the above as we get 1500 calls per device so one call every 62 seconds. With a single device we are fine since we get an extra 3200 calls buffer. As you increase device count you will consume that and hit the limit. As each device consumes 2880 calls per day. So if you have 3 devices will hit the limit. I am going to create a PR to change the default to 60 seconds call time.

@iprak
Copy link
Contributor

iprak commented Dec 24, 2024

I am testing out a version with DataCoordinator in my fork and can submit a PR as well.

@cdnninja
Copy link
Contributor

I am very open to cutting this over to a coordinator model. I don't think that is the core of the issue but makes life easier. Logs show a few duplicate polls on startup but after that no duplicate polls at the 30 second mark. One note would be to keep the PRs small, I find to get them approved they want the smallest chunk of work possible.

@webdjoe
Copy link
Contributor

webdjoe commented Dec 25, 2024

EDIT (Apologies, I missed a few posts) @GOTAZ If you would like it to be added and will assist in testing, please create an issue in the pyvesync library.

I tried to implement the DataCoordinator class a while ago, but from what I remember, it does not allow for the flexibility of changing the timing of multiple API endpoints. I could be wrong but my understanding is that it is primarily used for one endpoint that feeds multiple entities to prevent duplicate calls: https://developers.home-assistant.io/docs/integration_fetching_data/#separate-polling-for-each-individual-entity

@iprak
Copy link
Contributor

iprak commented Dec 25, 2024

That is true, DataCoordinator does not allow separate polling intervals but I don't think we are doing that anywhere in this integration ? I think the underlying package was implemented with combined update in mind since it has a 30s minimum update check on the manager.

@cdnninja
Copy link
Contributor

It is calling per entity within the device update call of the package. Package offers both so no concern changing that. Coordinator makes it easier to update since one place. From playing with the code it seems to update the frequency I have to do so in each entity vs one place.

@mattgphoto
Copy link

Hey there, I just wanted to report, I'm seeing similar behavior as #131409 which redirects to this issue. I suspect based on testing in the last few days, this is due to the API limit that VeSync has recently (not sure when). Is there going to be a way to adjust how many calls are made? I have turned off polling on this integration, but then no information updates of course. If polling is turned on, then all of my devices go offline in hours.

Running HAOS...
Core
2024.12.5
Supervisor
2024.12.0
Operating System
14.1
Frontend
20241127.8

Not sure if this helps, but when attempting to Reload the VeSync integration, this pops up in the logs (redacting my username):

2024-12-28 14:02:14.432 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 211, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-12-28 14:02:14.434 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 680, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-12-28 14:02:14.436 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 138, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-12-28 14:02:14.437 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 99, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

If there's any additional information I can provide or attempt to grab (non-coder here), I will be happy to try to get it!

@iprak
Copy link
Contributor

iprak commented Dec 28, 2024

Hey there, I just wanted to report, I'm seeing similar behavior as #131409 which redirects to this issue. I suspect based on testing in the last few days, this is due to the API limit that VeSync has recently (not sure when). Is there going to be a way to adjust how many calls are made? I have turned off polling on this integration, but then no information updates of course. If polling is turned on, then all of my devices go offline in hours.

Running HAOS... Core 2024.12.5 Supervisor 2024.12.0 Operating System 14.1 Frontend 20241127.8

Not sure if this helps, but when attempting to Reload the VeSync integration, this pops up in the logs (redacting my username):

2024-12-28 14:02:14.432 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 211, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-12-28 14:02:14.434 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 680, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-12-28 14:02:14.436 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 138, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2024-12-28 14:02:14.437 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry [email protected] for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 855, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 99, in async_unload_entry
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
    return await hass.data[DATA_COMPONENT].async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

If there's any additional information I can provide or attempt to grab (non-coder here), I will be happy to try to get it!

The refresh rate will be reduced to avoid exceeding the quota.
The error on reloading the integration is being addressed in #134166 (comment).

@cdnninja
Copy link
Contributor

cdnninja commented Jan 3, 2025

@Waank1 please open a new issue for this.

@cdnninja
Copy link
Contributor

cdnninja commented Jan 3, 2025

@Waank1 just realized this is a custom_component. So this isn't part of home assistant. Please open an issue wherever you found this custom version.

@cdnninja
Copy link
Contributor

cdnninja commented Feb 5, 2025

@fennemaj could you confirm this is solved in 2025.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants