Closed andrewjswan closed 3 months ago
2024-04-17 02:36:14.880 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
self._bootstrap_inner()
File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.12/threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker
work_item.run()
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/blitzortung/__init__.py", line 302, in on_mqtt_message
callback(lightning)
File "/config/custom_components/blitzortung/geo_location.py", line 117, in lightning_cb
self._async_add_entities([event])
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 495, in _async_schedule_add_entities_for_entry
task = self.config_entry.async_create_task(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1029, in async_create_task
task = hass.async_create_task(
File "/usr/src/homeassistant/homeassistant/core.py", line 729, in async_create_task
task = create_eager_task(target, name=name, loop=self.loop)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 33, in create_eager_task
return Task(
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 629, in async_add_entities
await add_func(coros, entities, timeout)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 577, in _async_add_entities
async with self.hass.timeout.async_timeout(timeout, self.domain):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/timeout.py", line 470, in async_timeout
current_task: asyncio.Task[Any] | None = asyncio.current_task()
^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
2024-04-17 02:36:14.881 WARNING (MainThread) [py.warnings] /usr/src/homeassistant/homeassistant/helpers/trace.py:143: RuntimeWarning: coroutine 'EntityPlatform._async_add_entity' was never awaited
trace_stack_var.set(trace_stack)
2024-04-17 03:00:59.373 ERROR (SyncWorker_4) [homeassistant.util.logging] Exception in _on_connection_change when dispatching 'blitzortung_mqtt_connected': ()
Traceback (most recent call last):
File "/config/custom_components/blitzortung/__init__.py", line 225, in _on_connection_change
sensor.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1181, in _async_write_ha_state
hass.states.async_set(
File "/usr/src/homeassistant/homeassistant/core.py", line 2181, in async_set
self._bus._async_fire( # pylint: disable=protected-access
File "/usr/src/homeassistant/homeassistant/core.py", line 1459, in _async_fire
self._hass.async_add_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 690, in async_add_hass_job
self.loop.call_soon(hassjob.target, *args)
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 795, in call_soon
self._check_thread()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 832, in _check_thread
raise RuntimeError(
RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one
closing as duplicate of #85. Can you check current version (1.3.2)?