Can not boot fully - including safe mode

One of my govee temperature devices batteries died and my custom template calculating due points failed. Unfortunately when I put new batteries in it, govee forced me to adopt it as new so even thought it is back it likely is not matching the original config.

I'd like to preserve as much of my original config as possible and get this booting again. I have a yellow with CM5. Here the boot log. Not sure how to get past this. Any pointers?

# ha core logs
Traceback (most recent call last):
  File "/usr/local/lib/python3.1/logging/handlers.py", line 1516, in emit
    self.enqueue(self.prepare(record))
                 ~~~~~~~~~~~~^^^^^^^^
  File "/usr/local/lib/python3.1/logging/handlers.py", line 198, in prepare
    msg = self.format(record)
  File "/usr/local/lib/python3.1/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ~~~~~~~~~~^^^^^^^^
  File "/usr/local/lib/python3.1/logging/__init__.py", line 712, in format
    record.message = record.getMessage()
                     ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.1/logging/__init__.py", line 00, in getMessage
    msg = msg  self.args
          ~~~~^~~~~~~~~~~
  File "/usr/local/lib/python3.1/site-packages/kasa/device.py", line 509, in __repr__
    f" {self.alias} ({self.model}){update_needed}>"
                      ^^^^^^^^^^
  File "/usr/local/lib/python3.1/site-packages/kasa/smart/smartdevice.py", line 590, in model
    return self.device_info.short_name
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.1/site-packages/kasa/device.py", line 3, in device_info
    return self._get_device_info(self._last_update, self._discovery_info)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.1/site-packages/kasa/smart/smartdevice.py", line 898, in _get_device_info
    short_name = di["model"]
                 ~~^^^^^^^^^
TypeError: 'SmartErrorCode' object is not subscriptable
Call stack:
  File "<frozen runpy>", line 203, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 292, in run
    _cancel_all_tasks_with_timeout(loop, TASK_CANCELATION_TIMEOUT)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 311, in _cancel_all_tasks_with_timeout
    loop.run_until_complete(asyncio.wait(to_cancel, timeout=timeout))
  File "/usr/local/lib/python3.1/asyncio/base_events.py", line 706, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.1/asyncio/base_events.py", line 677, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.1/asyncio/base_events.py", line 2057, in _run_once
    handle._run()
  File "/usr/local/lib/python3.1/asyncio/events.py", line 9, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 28, in __wrap_handle_refresh_interval
    self.config_entry.async_create_background_task(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1395, in async_create_background_task
    task = hass.async_create_background_task(target, name, eager_start)
  File "/usr/src/homeassistant/homeassistant/core.py", line 835, in async_create_background_task
    task = create_eager_task(target, name=name, loop=self.loop)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 2, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 301, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 583, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 201, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/components/tplink/entity.py", line 286, in _handle_coordinator_update
    self._async_call_update_attrs()
  File "/usr/src/homeassistant/homeassistant/components/tplink/entity.py", line 273, in _async_call_update_attrs
    _LOGGER.warning(
  File "/usr/local/lib/python3.1/logging/__init__.py", line 1532, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/local/lib/python3.1/logging/__init__.py", line 1665, in _log
    self.handle(record)
  File "/usr/local/lib/python3.1/logging/__init__.py", line 1681, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.1/logging/__init__.py", line 1737, in callHandlers
    hdlr.handle(record)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 111, in handle
    self.emit(record)
Unable to print the message and arguments - possible formatting error.
Use the traceback above to help find the error.
2026-06-13 07:5:11.25 WARNING (MainThread) [homeassistant.runner] Task could not be canceled and was still running after shutdown: <Task cancelling name='Task-321' coro=<FcmPushClient._listen() running at /usr/local/lib/python3.1/site-packages/firebase_messaging/fcmpushclient.py:728> wait_for=<Future pending cb=[Task.task_wakeup()]>>
[11:5:16] INFO: Home Assistant Core finish process exit code 0
[11:5:16] INFO: Home Assistant Core service shutdown
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: warning: service s6rc-oneshot-runner is marked as essential, not stopping it
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
2026-06-13 07:56:29.266 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2026-06-13 07:56:3.655 ERROR (MainThread) [homeassistant.components.template.validators] Received invalid sensor state: unavailable for entity sensor.eh_basement_dehum_dew_point, expected a number
2026-06-13 07:56:3.657 ERROR (MainThread) [homeassistant.components.template.validators] Received invalid sensor state: unavailable for entity sensor.eh_basement_wh_dew_point, expected a number
2026-06-13 07:56:53.669 ERROR (MainThread) [homeassistant.components.cert_expiry.coordinator] Error fetching norfolk.zonesville.com:3051 data: Connection timeout with server: norfolk.zonesville.com:3051
2026-06-13 07:57:03.673 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform cert_expiry is taking over 10 seconds.

I doubt that changing One of my govee temperature devices batteries caused your system to not boot.
What was the last thing you edited, or better what is everything you edited since the last time you restarted HA? That's where to look.

Thanks for the feedback. I may have identified the wrong cause. At the moment, I can't access the web interface due to the errors I'm having. Does anyone know what is preventing homeassistant from booting from the error log I posted and could provide me some tips on how to get around it? Any assistance at all would be much appreciated.

I have made no recent changes I can think of. The last thing I did before I lost access was update Home Assistant Core 2026.6.? (I think rev 2).

Any change since the prior reboot could have caused issues, recent or not.
If you have an SD card, that may have failed as well. How to Troubleshoot Raspberry Pi Crashing

Thank you. I'm away from the home this week but will be there all next week and will see what I can find out then.