WTH is Homeassistant sometimes not reachable without any errors in the log?

My Homeassistant is sometimes not reachable for a couple of minutes. On some days it’s nearly constantly, other times I can go days or weeks without noticing anything. In the core logs there’s only constanty the same warning I haven’t had the time to fix yet:

2024-12-06 09:04:00.002 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'icon' when rendering '{
  {{('"icon"' if value_template.icon) ~ (":" if value_template.icon) ~ ('"' ~ value_template.icon ~ '"' if value_template.icon) }}
  {{"," if value_template.icon}} "text":"{{prefix_text~value_template.text~suffix_text}}"

All other logs show nothing for the last time I experienced it (today at around 9:05).

This is likely network related and unrelated to HA at all. Have you looked into your network at all?

It’s also not a WTH and should be renamed and recategorized.

Technically it is according to the powers that be

Could it be that your hardware is just under powered?
An underpowered. cPU would not raise any warnings, but just be slow until it could cat h up again.
How is your setup and what addons and integrations are you using?
If you are running on a hypervisor, then on what HostOS and what other VMs are running?

Network has no issues I know of. I can even access Addons without any issues while this happens.
CPU shouldn’t be an issue as well. It’s an N100 system and like I said I can access other stuff on the system without any issues and everything is responsive. I have no VMs or similar running. Only Docker stuff as far as I understand HA Add-ons.
I have Duckdns, EVCC, Matter Server, Mosquitto, RaspberryMatic, Samba share, Vcontrol and Zigbee2MQTT Add-ons running.

Sounds like something is making a blocking call for some function.
Do you get a depreciation error in the logs when you restart core?
One that is not a warning about a depreciation in the future.

Nothing. Only error I got was

2024-12-06 18:37:50.134 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.l10s_pro_ultra_heat_map for domain camera with platform dreame_vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 608, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 927, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1382, in add_to_platform_finish
    await self.async_internal_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 829, in async_internal_added_to_hass
    await self.async_refresh_providers(write_state=False)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 837, in async_refresh_providers
    old_provider = self._webrtc_provider
                   ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider'

And a couple of warnings about HACS components being installed.

Are you looking at the raw text logs or the gui logs?

Both. The above is from the raw log.

Maybe you need to increase the log level to actually catch this one.

I will try that after I’ve fixed all the warnings. But since the issue is intermittent and can sometimes take days or weeks before occurring, it’s hard to debug.

Understandable, but it should be written in the current logs, homeassistant.log, or if the system was restarted then in the logs from the previous run, homeassistant.log.1

I managed to track down the cause of the warnings. The Awtrix blueprint didn’t like having no icon set for a message. I’ve fixed that now. I’ll increase the logging and report back when it next occurs.

Perfect! One step forward. :smiley:

I just hope the error shows itself before the debug log fills the entire 4TB SSD. :sweat_smile: