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

Unavailable #285

Closed
Simon-Naylor opened this issue Aug 5, 2024 · 3 comments
Closed

Unavailable #285

Simon-Naylor opened this issue Aug 5, 2024 · 3 comments

Comments

@Simon-Naylor
Copy link

I'm now constantly getting the Unavailable when looking at any entity for my Toyota RAV4.

I get the following when looking at the logs:-

Error while setting up toyota platform for sensor

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/sensor.py", line 209, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

I wonder if this is cased by the fact that this Integration reports 2 devices (my old RAV4, that I traded in for my new RAV4). I can't see how to delete the old car, so the best I have done is disable it. Could this old car be causing some problem, if the integration tries to pull any data for it.

Thanks
-Si-

@VivantSenior
Copy link

I have the same error even after checking the MyT app for some popups:

2024-08-08 17:50:33.675 ERROR (MainThread) [custom_components.toyota] 1 validation error for NotificationResponseModel
guid
  field required (type=value_error.missing)
2024-08-08 17:50:33.676 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up toyota.binary_sensor
2024-08-08 17:50:33.676 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up toyota platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/toyota/binary_sensor.py", line 232, in async_setup_entry
    for index, _ in enumerate(coordinator.data):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 17:50:33.678 INFO (MainThread) [homeassistant.components.device_tracker] Setting up toyota.device_tracker
2024-08-08 17:50:33.679 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up toyota platform for device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/toyota/device_tracker.py", line 39, in async_setup_entry
    for index, vehicle in enumerate(coordinator.data)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 17:50:33.680 INFO (MainThread) [homeassistant.components.sensor] Setting up toyota.sensor
2024-08-08 17:50:33.681 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up toyota platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/toyota/sensor.py", line 209, in async_setup_entry
    for index, _ in enumerate(coordinator.data):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 17:50:43.135 ERROR (MainThread) [custom_components.toyota] 1 validation error for NotificationResponseModel
guid
  field required (type=value_error.missing)
2024-08-08 17:50:43.135 DEBUG (MainThread) [custom_components.toyota] Finished fetching toyota data in 0.816 seconds (success: True)
2024-08-08 17:50:43.136 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up toyota.binary_sensor
2024-08-08 17:50:43.136 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up toyota platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/toyota/binary_sensor.py", line 232, in async_setup_entry
    for index, _ in enumerate(coordinator.data):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 17:50:43.139 INFO (MainThread) [homeassistant.components.device_tracker] Setting up toyota.device_tracker
2024-08-08 17:50:43.139 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up toyota platform for device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/toyota/device_tracker.py", line 39, in async_setup_entry
    for index, vehicle in enumerate(coordinator.data)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 17:50:43.142 INFO (MainThread) [homeassistant.components.sensor] Setting up toyota.sensor
2024-08-08 17:50:43.143 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up toyota platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/toyota/sensor.py", line 209, in async_setup_entry
    for index, _ in enumerate(coordinator.data):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable```

@wolfspirituk
Copy link

Similar for me - but no "old car" involved. I think I have a few more errors as well - the blocking call doesn't seem good.

My perception is that it has been happening for a few days and is getting worse (more errors).

2024-08-08 19:30:06.897 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/root/.cache/toyota_credentials_cache_contains_secrets', 'r') inside the event loop by custom integration 'toyota' at custom_components/toyota/init.py, line 56: client = MyT( (offender: /usr/local/lib/python3.12/site-packages/mytoyota/controller.py, line 56: with open(str(CACHE_FILENAME), "r", encoding="utf-8") as f:), please create a bug report at https://github.com/DurgNomis-drol/ha_toyota/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 190, 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 167, in async_setup_component
result = await _async_setup_component(hass, domain, config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 449, in async_setup_component
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/setup.py", line 451, in
create_eager_task(
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 37, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 734, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/toyota/init.py", line 56, in async_setup_entry
client = MyT(

2024-08-08 19:30:08.501 ERROR (MainThread) [custom_components.toyota] 2 validation errors for NotificationResponseModel
guid
field required (type=value_error.missing)
payload -> 0 -> vin
field required (type=value_error.missing)

2024-08-08 19:30:09.853 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up toyota platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/binary_sensor.py", line 232, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 19:30:09.857 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up toyota platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/device_tracker.py", line 39, in async_setup_entry
for index, vehicle in enumerate(coordinator.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 19:30:09.860 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up toyota platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/sensor.py", line 209, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 19:50:51.505 ERROR (MainThread) [custom_components.toyota] 2 validation errors for NotificationResponseModel
guid
field required (type=value_error.missing)
payload -> 0 -> vin
field required (type=value_error.missing)
2024-08-08 19:50:51.505 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up toyota platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/binary_sensor.py", line 232, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 19:50:51.507 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up toyota platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/device_tracker.py", line 39, in async_setup_entry
for index, vehicle in enumerate(coordinator.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
2024-08-08 19:50:51.509 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up toyota platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/toyota/sensor.py", line 209, in async_setup_entry
for index, _ in enumerate(coordinator.data):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

@CM000n
Copy link
Collaborator

CM000n commented Aug 14, 2024

This is a duplicate of #286

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

4 participants