Home Assistant keeps restarting on a loop after update

Hey everyone, I’ve been running a Home Assistant server for years now without problems but after updating from 2023.11 to 2024.1 the system keeps restarting every 3-15 minutes. I’ll attach the logs from before the restart but I can’t spot anything in them that may cause the issue. I did a restore multiple times, downgraded Core back to 2023.11, replaced the SD card on the Pi, and updated all integrations to the latest version all without success. I’m getting a little desperate at this point as my whole home runs on Home Assistant. Does anyone have any ideas on what can the issue be?

Those are the home-assistant.log.1 contents:

2024-02-26 16:21:19.813 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration xiaomi_cloud_map_extractor 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-02-26 16:21:19.816 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration localtuya 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-02-26 16:21:19.820 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration alexa_media 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-02-26 16:21:19.823 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-02-26 16:21:19.827 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fontawesome 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-02-26 16:21:19.829 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration portainer 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-02-26 16:21:19.833 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration holidays 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-02-26 16:21:19.835 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthinq_sensors 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-02-26 16:21:19.838 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration yahoofinance 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-02-26 16:21:19.841 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration rki_covid 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-02-26 16:21:19.842 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration spotcast 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-02-26 16:21:20.472 WARNING (MainThread) [homeassistant.components.http] The 'base_url' option near /config/configuration.yaml:469 is deprecated, please remove it from your configuration
2024-02-26 16:21:25.185 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=1387 from 2024-02-26 15:14:54.143096)
2024-02-26 16:21:57.677 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2024-02-26 16:21:57.678 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
2024-02-26 16:21:57.678 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2024-02-26 16:21:57.678 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2024-02-26 16:21:57.678 WARNING (MainThread) [homeassistant.setup] Setup of schedule is taking over 10 seconds.
2024-02-26 16:21:57.678 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2024-02-26 16:21:57.678 WARNING (MainThread) [homeassistant.setup] Setup of yahoofinance is taking over 10 seconds.
2024-02-26 16:21:57.679 WARNING (MainThread) [homeassistant.setup] Setup of tag is taking over 10 seconds.
2024-02-26 16:21:57.679 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2024-02-26 16:21:57.679 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2024-02-26 16:21:57.679 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
2024-02-26 16:21:57.679 WARNING (MainThread) [homeassistant.setup] Setup of influxdb is taking over 10 seconds.
2024-02-26 16:22:00.897 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-02-26 16:22:00.899 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-02-26 16:22:00.913 WARNING (MainThread) [homeassistant.setup] Setup of application_credentials is taking over 10 seconds.
2024-02-26 16:22:02.687 WARNING (MainThread) [custom_components.smartthinq_sensors] Connection not available. ThinQ platform not ready
Traceback (most recent call last):
  File "/config/custom_components/smartthinq_sensors/__init__.py", line 252, in async_setup_entry
    client = await lge_auth.create_client_from_token(refresh_token, oauth2_url)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/__init__.py", line 151, in create_client_from_token
    return await ClientAsync.from_token(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1562, in from_token
    gateway = await Gateway.discover(core)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 744, in discover
    gw_info = await core.gateway_info()
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 450, in gateway_info
    result = await self.thinq2_get(V2_GATEWAY_URL)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 332, in thinq2_get
    async with self._get_session().get(
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 504, in _request
    with timer:
  File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError
2024-02-26 16:22:08.723 WARNING (SyncWorker_24) [homeassistant.components.google] The 'max_results' option is deprecated, please remove it from your configuration
2024-02-26 16:22:08.739 WARNING (SyncWorker_15) [homeassistant.components.google] The 'max_results' option is deprecated, please remove it from your configuration
2024-02-26 16:22:10.903 ERROR (SyncWorker_35) [custom_components.spotcast.helpers] spotify integration not found
2024-02-26 16:22:14.425 ERROR (MainThread) [homeassistant.components.device_tracker] Platform mobile_app does not generate unique IDs. ID 5506BD3A-E3C5-5411-93C9-B52B70E78F61 already exists - ignoring device_tracker.iliyans_macbook_pro_2
2024-02-26 16:22:14.430 ERROR (MainThread) [homeassistant.components.device_tracker] Platform mobile_app does not generate unique IDs. ID 5506BD3A-E3C5-5411-93C9-B52B70E78F61 already exists - ignoring device_tracker.iliyans_macbook_pro_2
2024-02-26 16:22:14.447 ERROR (MainThread) [homeassistant.components.device_tracker] Platform mobile_app does not generate unique IDs. ID 5506BD3A-E3C5-5411-93C9-B52B70E78F61 already exists - ignoring device_tracker.iliyans_macbook_pro_2
2024-02-26 16:22:14.452 ERROR (MainThread) [homeassistant.components.device_tracker] Platform mobile_app does not generate unique IDs. ID 5506BD3A-E3C5-5411-93C9-B52B70E78F61 already exists - ignoring device_tracker.iliyans_macbook_pro_2
2024-02-26 16:22:14.510 ERROR (MainThread) [homeassistant.components.device_tracker] Platform mobile_app does not generate unique IDs. ID 5506BD3A-E3C5-5411-93C9-B52B70E78F61 already exists - ignoring device_tracker.iliyans_macbook_pro_2
2024-02-26 16:22:14.519 ERROR (MainThread) [homeassistant.components.device_tracker] Platform mobile_app does not generate unique IDs. ID 5506BD3A-E3C5-5411-93C9-B52B70E78F61 already exists - ignoring device_tracker.iliyans_macbook_pro_2
2024-02-26 16:22:16.429 WARNING (SyncWorker_33) [homeassistant.components.google] The 'max_results' option is deprecated, please remove it from your configuration
2024-02-26 16:22:16.907 WARNING (SyncWorker_3) [homeassistant.components.google] The 'max_results' option is deprecated, please remove it from your configuration
2024-02-26 16:22:27.658 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform fritz is taking over 10 seconds.
2024-02-26 16:22:27.661 WARNING (MainThread) [homeassistant.components.media_player] Setup of media_player platform dlna_dmr is taking over 10 seconds.
2024-02-26 16:22:46.542 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.living_room_tv is taking over 10 seconds
2024-02-26 16:22:46.578 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2024-02-26 16:23:12.586 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching Roborock S6 data
2024-02-26 16:23:12.603 ERROR (MainThread) [custom_components.alexa_media] Error fetching alexa_media data: Error communicating with API: 
2024-02-26 16:23:15.153 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({%set x =state_attr('sensor.washer', 'remain_time')%} {{x[:4]}}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 572, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2332, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
TypeError: 'NoneType' object is not subscriptable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 698, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 574, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TypeError: 'NoneType' object is not subscriptable
2024-02-26 16:23:15.192 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('TypeError: 'NoneType' object is not subscriptable') while processing template 'Template<template=({%set x =state_attr('sensor.washer', 'remain_time')%} {{x[:4]}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.washer_time_ramaining'
2024-02-26 16:23:15.386 WARNING (MainThread) [homeassistant.components.ssdp] Could not set up UPnP/SSDP server, as a presentation URL could not be determined; Please configure your internal URL in the Home Assistant general configuration
2024-02-26 16:23:15.952 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2013, 'Lost connection to server during query')
[SQL: SELECT event_data.data_id, event_data.shared_data 
FROM event_data 
WHERE event_data.hash IN (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (1292087302, 3188840457, 1458655248, 3773317143, 3053750296, 2131900446, 23214114, 843243556, 1415952421, 1947740199, 2071222324, 2653450300, 1011968062, 1400549441, 2705000516, 2309658693, 3447128136, 3887671376, 2164709457, 3367438427, 2869069915, 3736514654, 3299436642, 2750140522, 172007533, 2311219313, 3775772790, 719495289, 3140765827, 1609840773, 1615509640, 3746672781, 4272361618, 1677981849, 3690074268, 4008188062, 4253694113, 2664644777, 3238719658, 951009453, 368105647, 3505369264, 1473257651, 3895992503, 409766074, 191371452, 2850234557, 1614850239, 4274417857, 3279812804 ... 433 parameters truncated ... 300140316, 3248484128, 1607337762, 4140431142, 2847514412, 176242481, 2027501372, 2659395408, 1524037459, 3926802261, 1544623961, 1731411801, 3425488731, 676935516, 1213892450, 1708697444, 2875817831, 1051631467, 1203287921, 3542925177, 2887739263, 3389497215, 2517655425, 260982660, 1793896326, 4222535558, 2212044684, 3890923419, 719050667, 2416029611, 3576043443, 816558005, 183388086, 3481180105, 1123422153, 2924769229, 2564083662, 3653924816, 2773102545, 2909149139, 619329496, 3478298589, 3573479396, 3324702693, 2208995302, 438128614, 3517769704, 12236785, 1921685490, 4137299955)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-02-26 16:23:15.911 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/netatmo/__init__.py", line 144, in register_webhook
    webhook_url = webhook_generate_url(hass, entry.data[CONF_WEBHOOK_ID])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 92, in async_generate_url
    get_url(hass, prefer_external=True, allow_cloud=False),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 167, in get_url
    request_host = _get_request_host()
                   ^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 206, in _get_request_host
    raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError
2024-02-26 16:23:16.096 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: Can't reconnect until invalid transaction is rolled back.  Please rollback() fully before proceeding (Background on this error at: https://sqlalche.me/e/20/8s2b)
2024-02-26 16:23:16.202 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: Can't reconnect until invalid transaction is rolled back.  Please rollback() fully before proceeding (Background on this error at: https://sqlalche.me/e/20/8s2b)
2024-02-26 16:23:16.475 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Flip iPad battery boolean' trigger: In 'numeric_state' condition: unknown entity sensor.iliyans_ipad_battery_state
2024-02-26 16:23:16.475 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Reset iPad Battery Toggle' trigger: In 'numeric_state' condition: unknown entity sensor.iliyans_ipad_battery_state
2024-02-26 16:23:16.475 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Reset iPad Battery Toggle' trigger: In 'numeric_state' condition: unknown entity sensor.iliyans_ipad_battery_state
2024-02-26 16:23:16.203 ERROR (Recorder) [homeassistant.components.recorder.core] Recorder._run threw unexpected exception, recorder shutting down
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 698, in run
    self._run()
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 778, in _run
    self._run_event_loop()
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 862, in _run_event_loop
    self._pre_process_startup_events(startup_task_or_events)
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 895, in _pre_process_startup_events
    self.event_data_manager.load(non_state_change_events, session)
  File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/event_data.py", line 56, in load
    self._load_from_hashes(hashes, session)
  File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/event_data.py", line 98, in _load_from_hashes
    for data_id, shared_data in execute_stmt_lambda_element(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 230, in execute_stmt_lambda_element
    executed = session.connection().execute(stmt)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
    return meth(
           ^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/sql/lambdas.py", line 604, in _execute_on_connection
    return connection._execute_clauseelement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1639, in _execute_clauseelement
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1812, in _execute_context
    conn = self._revalidate_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 669, in _revalidate_connection
    self._invalid_transaction()
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 659, in _invalid_transaction
    raise exc.PendingRollbackError(
sqlalchemy.exc.PendingRollbackError: Can't reconnect until invalid transaction is rolled back.  Please rollback() fully before proceeding (Background on this error at: https://sqlalche.me/e/20/8s2b)
2024-02-26 16:23:16.684 ERROR (Recorder) [homeassistant.components.recorder.core] Error saving the event session during shutdown: Can't reconnect until invalid transaction is rolled back.  Please rollback() fully before proceeding (Background on this error at: https://sqlalche.me/e/20/8s2b)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1457, in _end_session
    self._commit_event_session_or_retry()
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1182, in _commit_event_session_or_retry
    self._commit_event_session()
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1202, in _commit_event_session
    session.commit()
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 1969, in commit
    trans.commit(_to_root=True)
  File "<string>", line 2, in commit
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
    ret_value = fn(self, *arg, **kw)
                ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 1256, in commit
    self._prepare_impl()
  File "<string>", line 2, in _prepare_impl
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
    ret_value = fn(self, *arg, **kw)
                ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 1231, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4312, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4447, in _flush
    with util.safe_reraise():
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4408, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 466, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/unitofwork.py", line 642, in execute
    util.preloaded.orm_persistence.save_obj(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 85, in save_obj
    _emit_update_statements(
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/persistence.py", line 910, in _emit_update_statements
    c = connection.execute(
        ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
    return meth(
           ^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 517, in _execute_on_connection
    return connection._execute_clauseelement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1639, in _execute_clauseelement
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1812, in _execute_context
    conn = self._revalidate_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 669, in _revalidate_connection
    self._invalid_transaction()
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 659, in _invalid_transaction
    raise exc.PendingRollbackError(
sqlalchemy.exc.PendingRollbackError: Can't reconnect until invalid transaction is rolled back.  Please rollback() fully before proceeding (Background on this error at: https://sqlalche.me/e/20/8s2b)
2024-02-26 16:23:17.242 ERROR (MainThread) [pyhap.characteristic] SecuritySystemCurrentState: value=0 is an invalid value.
2024-02-26 16:23:17.243 ERROR (MainThread) [pyhap.characteristic] SecuritySystemTargetState: value=0 is an invalid value.
2024-02-26 16:23:17.244 ERROR (MainThread) [pyhap.characteristic] SecuritySystemCurrentState: value=0 is an invalid value.
2024-02-26 16:23:17.245 ERROR (MainThread) [pyhap.characteristic] SecuritySystemTargetState: value=0 is an invalid value.
2024-02-26 16:23:17.278 ERROR (MainThread) [homeassistant.components.homekit.util] media_player.xbox does not support any media_player features
2024-02-26 16:23:17.415 WARNING (MainThread) [custom_components.hacs] You have 'mattieha/slider-button-card' installed with HACS this repository has been removed from HACS, please consider removing it. Removal reason (Abandoned, community fork maintained at custom-cards/slider-button-card)
2024-02-26 16:23:17.424 WARNING (MainThread) [custom_components.hacs] You have 'AitorDB/home-assistant-sun-card' installed with HACS this repository has been removed from HACS, please consider removing it. Removal reason (Repository is archived)
2024-02-26 16:23:19.664 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] tv_usage_daily received an invalid new state from light.tv : off
2024-02-26 16:24:43.072 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] tv_usage_daily received an invalid new state from light.tv : on
2024-02-26 16:24:43.081 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] tv_usage_daily received an invalid new state from light.tv : on
2024-02-26 16:24:43.087 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] tv_usage_daily received an invalid new state from light.tv : on

1 Like