Skip to content

Commit a906a17

Browse files
authored
Avoid DomainData lookup in ESPHome update platform (#144072)
We can get this from entry.runtime_data
1 parent 255beaf commit a906a17

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

homeassistant/components/esphome/update.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from .const import DOMAIN
3030
from .coordinator import ESPHomeDashboardCoordinator
3131
from .dashboard import async_get_dashboard
32-
from .domain_data import DomainData
3332
from .entity import (
3433
EsphomeEntity,
3534
convert_api_error_ha_error,
@@ -62,7 +61,7 @@ async def async_setup_entry(
6261

6362
if (dashboard := async_get_dashboard(hass)) is None:
6463
return
65-
entry_data = DomainData.get(hass).get_entry_data(entry)
64+
entry_data = entry.runtime_data
6665
assert entry_data.device_info is not None
6766
device_name = entry_data.device_info.name
6867
unsubs: list[CALLBACK_TYPE] = []

0 commit comments

Comments
 (0)