Occasionally (every few days or so) HomeAssistant reboots on its own.
I have no idea why and the log files are not really giving me a clue.
Anyone able to point me in the right dirction?
2025-10-09 07:03:35.256 ERROR (MainThread) [homeassistant.components.modbus] Pymodbus: modbuspvsystem: Error: device: 85 address: 1055 -> Modbus Error: [Input/Output] Request cancelled outside pymodbus.
2025-10-09 07:03:35.564 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ (states('sensor.alphaess_pv1_power') | int + states('sensor.alphaess_pv2_power') | int) |int }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.alphaess_pv1_power') | int + states('sensor.alphaess_pv2_power') | int) |int }}) renders=38082>' for attribute '_attr_native_value' in entity 'sensor.alpha_ess_actual_production'
2025-10-09 07:03:35.626 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{states('sensor.alphaess_current_pv_production')|float > 0 }}' but no default was specified') while processing template 'Template<template=({{states('sensor.alphaess_current_pv_production')|float > 0 }}) renders=38078>' for attribute '_state' in entity 'binary_sensor.alpha_pv_generating'
2025-10-09 07:03:40.419 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object Response.aiter_bytes at 0x7ffac7a3f400> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.421 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object Response.aiter_text at 0x7ffa8713f010> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.423 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object AsyncHTTP2Connection._receive_response_body at 0x7ffa6b57f010> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.424 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object HTTP2ConnectionByteStream.__aiter__ at 0x7ffa88ab9940> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.426 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object Response.aiter_raw at 0x7ffa543d5540> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.428 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object BoundAsyncStream.__aiter__ at 0x7ffa75121d80> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.430 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object PoolByteStream.__aiter__ at 0x7ffa4a0ca5e0> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.432 ERROR (MainThread) [homeassistant] Error doing job: an error occurred during closing of asynchronous generator <async_generator object AsyncResponseStream.__aiter__ at 0x7ffa5d54a7a0> (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
During handling of the above exception, another exception occurred:
RuntimeError: aclose(): asynchronous generator is already running
2025-10-09 07:03:40.441 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 229, in <module>
sys.exit(main())
~~~~^^
File "/usr/src/homeassistant/homeassistant/__main__.py", line 215, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 271, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
self.run_forever()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
self._run_once()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1998, in _run_once
handle = heapq.heappop(self._scheduled)
RuntimeError: list changed size during iteration
2025-10-09 07:03:41.097 ERROR (stream_worker) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/local/lib/python3.13/threading.py", line 994, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 481, in _run_worker
stream_worker(
~~~~~~~~~~~~~^
self.source,
^^^^^^^^^^^^
...<4 lines>...
self._thread_quit,
^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 668, in stream_worker
muxer.mux_packet(packet)
~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 271, in mux_packet
self.check_flush_part(packet)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 310, in check_flush_part
self.flush(packet, last_part=False)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 359, in flush
self._hass.loop.call_soon_threadsafe(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self._segment.async_add_part,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<15 lines>...
),
^^
)
^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 878, in call_soon_threadsafe
self._check_closed()
~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 556, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
2025-10-09 07:03:41.134 ERROR (stream_worker) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/local/lib/python3.13/threading.py", line 994, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 481, in _run_worker
stream_worker(
~~~~~~~~~~~~~^
self.source,
^^^^^^^^^^^^
...<4 lines>...
self._thread_quit,
^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 668, in stream_worker
muxer.mux_packet(packet)
~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 271, in mux_packet
self.check_flush_part(packet)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 310, in check_flush_part
self.flush(packet, last_part=False)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 359, in flush
self._hass.loop.call_soon_threadsafe(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self._segment.async_add_part,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<15 lines>...
),
^^
)
^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 878, in call_soon_threadsafe
self._check_closed()
~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 556, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
2025-10-09 07:03:41.200 ERROR (stream_worker) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/local/lib/python3.13/threading.py", line 994, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 481, in _run_worker
stream_worker(
~~~~~~~~~~~~~^
self.source,
^^^^^^^^^^^^
...<4 lines>...
self._thread_quit,
^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 668, in stream_worker
muxer.mux_packet(packet)
~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 271, in mux_packet
self.check_flush_part(packet)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 310, in check_flush_part
self.flush(packet, last_part=False)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 359, in flush
self._hass.loop.call_soon_threadsafe(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self._segment.async_add_part,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<15 lines>...
),
^^
)
^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 878, in call_soon_threadsafe
self._check_closed()
~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 556, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed