core
core copied to clipboard
ESPHome Firmware Status Unavailable
The problem
After installing the latest update to Home Assistant, the various ESPHome devices are no longer showing the firmware update status in the UI:
The devices work normally otherwise. Looking in the full Home Assistant Core logs, I see a bunch of ESPHome Dashboard errors (logs in the log section below).
The YAML section below is the ESPHome add-on configuration.
Restarting home assistant or even rebooting the whole VM did not help. Stopping and starting the ESPHome add-on doesn't help either.
What version of Home Assistant Core has the issue?
core-2023.2.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ESPHome
Link to integration documentation on our website
https://www.home-assistant.io/integrations/esphome/
Diagnostics information
config_entry-esphome-7689d369279cfeda08aeb7cdba1fd63e.json.txt
ESPHome Add-On Configuration
ssl: true
status_use_ping: true
certfile: sub.domain.net-chain-2022.crt
keyfile: sub.domain.net-key-2022.pem
Anything in the logs that might be useful for us?
2023-02-14 21:48:15.203 ERROR (MainThread) [homeassistant.components.esphome.dashboard] Error requesting ESPHome Dashboard data: Cannot connect to host 127.0.0.1:62763 ssl:default [Connect call failed ('127.0.0.1', 62763)]
2023-02-14 21:48:15.819 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_2412344bdcb6840b1b82d837b8aa6ddd_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.835 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_9b17d6a1c75469ce5bb67a131ab1081a_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.836 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_d2f1b5ecd7b2d9156991404680ef0d5e_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.838 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_e8eff1d964ffaca14b9afabdbf870fa8_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.839 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_e1492e0e634790ee3a5f7c16afbff9e9_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.846 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_7689d369279cfeda08aeb7cdba1fd63e_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.855 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_1a685d9d9b011ef0a69a463b23f490e0_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.856 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_b37803f70d5e4ad4b040c008f3969b40_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.860 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_2583d1eb1b609bacc870693a0af8e516_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.866 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_70b3d283d1c3cf98469ffbd0ab6c9d4f_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
2023-02-14 21:48:15.889 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_94d4b8187916a6d751bb110a22009985_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
Additional information
No response
Hey there @ottowinter, @jesserockz, mind taking a look at this issue as it has been labeled with an integration (esphome
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of esphome
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Change the title of the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign esphome
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
esphome documentation esphome source (message by IssueLinks)
Updated ESPHome to 2023.2.0, no change. Rebooted VM, still no change. Disabled SSL in ESPHome addon and rebooted VM, still no change.
Every time Home Assistant starts up, it has the same errors in the log.
I am also having this issue. Running ESPHome 2023.2.0 and Home Assistant 2023.2.4.
It worked fine after update. I "restarted" HASS through the web UI, and it continued working fine.
When I had to fully reboot the VM, the issue started acting up (same as original issue post)
2023.02.5
2023-02-16 20:33:04.858 ERROR (MainThread) [homeassistant.util.logging] Exception in setup_update_entity when dispatching 'esphome_XXXXX_on_device_update': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity
async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)])
File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__
if coordinator.supports_update:
File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update
raise RuntimeError("Data needs to be loaded first")
RuntimeError: Data needs to be loaded first
Updating 2023.2.4 → 2023.2.5 with the ESPHome add-on running got the update notifications working again. This appears to be an issue with how Home Assistant handles (or rather doesn't) the ESPHome add-on not being up quickly enough at boot.
My ESPHome addon does not start automatically, and more often it is turned off than on, because it is not needed all the time, only at the time of flashing Esp. Well, sometimes it’s more convenient to flash from the command line on another computer than through ESPHome addon. I think it's worth analyzing the launch state of the ESPHome addon, if it is necessary, and in the sensors with the update status, display unknown or something like that.
Agree. In the meantime a solution seems to be to restart Home Assistant core only (not all the hardware).
Hi, I also started having this issue. I'm running 2023.2.5 (maybe earlier versions, too) and the Addon is always running with all 4 options enabled on the addon:
Start on boot Watchdog Auto update Show in sidebar
but, my firmware entity is still not showing up. It was working before, much so I actually now have an automation to automatically update the ESPHome devices at mid-night if there is an update.
If its related to startup and ESPHome not booting fast enough, it could be luck of the draw when it works or not, maybe.
Just wondering if there has been any changes to this, as I'm still not seeing the sensor come back, still unavailable
, despite core restarts and even supervisor restarts.
I did find an error message which in my logs which may be relevant to this issue :
Logger: homeassistant.util.logging
Source: util/logging.py:159
First occurred: 11:29:43 AM (1 occurrences)
Last logged: 11:29:43 AM
Exception in setup_update_entity when dispatching 'esphome_d9a7336a880514ad4c20f419954c268c_on_device_update': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)]) File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 87, in __init__ if coordinator.supports_update: File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update raise RuntimeError("Data needs to be loaded first") RuntimeError: Data needs to be loaded first.
I restarted my whole system and saw this issue yesterday. Once I restarted just core, the issue went away. That would make sense if it’s dependent on the esphome addon running to show the firmware sensor. It might not have been running when HA tried to get its status and went unavailable. So either have it wait, or retry instead of just going unavailable would be a good fix IMO.
it was working for me, for about 3 weeks now...but just updated to
Supervisor 2023.03.3 Operating System 10.0.rc2
as I joined the beta, and now the entities are back to be unavailable likely because OS had to be restarted.
Logger: homeassistant.util.logging
Source: util/logging.py:156
First occurred: 9:10:39 AM (12 occurrences)
Last logged: 9:10:42 AM
Exception in setup_update_entity when dispatching 'esphome_288704ca00b9546d0bbd43a5dbe82156_on_device_update': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)]) File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 90, in __init__ if coordinator.supports_update and not self._device_info.has_deep_sleep: File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update raise RuntimeError("Data needs to be loaded first") RuntimeError: Data needs to be loaded first
Exception in setup_update_entity when dispatching 'esphome_cfafa4395f983a8732d1eea3f6d2eef3_on_device_update': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)]) File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 90, in __init__ if coordinator.supports_update and not self._device_info.has_deep_sleep: File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update raise RuntimeError("Data needs to be loaded first") RuntimeError: Data needs to be loaded first
Exception in setup_update_entity when dispatching 'esphome_3f6ff39c33cb30e182dc3d7f4bba9c8b_on_device_update': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)]) File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 90, in __init__ if coordinator.supports_update and not self._device_info.has_deep_sleep: File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update raise RuntimeError("Data needs to be loaded first") RuntimeError: Data needs to be loaded first
Exception in setup_update_entity when dispatching 'esphome_168d3c66533f7ebc26326678e0e5864a_on_device_update': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)]) File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 90, in __init__ if coordinator.supports_update and not self._device_info.has_deep_sleep: File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update raise RuntimeError("Data needs to be loaded first") RuntimeError: Data needs to be loaded first
Exception in setup_update_entity when dispatching 'esphome_d9a7336a880514ad4c20f419954c268c_on_device_update': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 56, in setup_update_entity async_add_entities([ESPHomeUpdateEntity(entry_data, dashboard)]) File "/usr/src/homeassistant/homeassistant/components/esphome/update.py", line 90, in __init__ if coordinator.supports_update and not self._device_info.has_deep_sleep: File "/usr/src/homeassistant/homeassistant/components/esphome/dashboard.py", line 91, in supports_update raise RuntimeError("Data needs to be loaded first") RuntimeError: Data needs to be loaded first
If the esphome dashboard add on is not available when the entity is created this happens.
we can likely add some checks for last update success and try again later when the dashboard is back
Hey any love for this issue? 😁
Just updated to HAOS 10.1 and they're all unavailable again. A core restart will bring them back.
Thanks