1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 00:20:30 +01:00

Fix StopIteration error in ista EcoTrend coordinator (#166929)

This commit is contained in:
Manu
2026-03-31 15:35:17 +02:00
committed by Bram Kragten
parent 4d168023a2
commit d432092296
3 changed files with 3 additions and 8 deletions

View File

@@ -23,7 +23,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: IstaConfigEntry) -> bool
ista = PyEcotrendIsta(
entry.data[CONF_EMAIL],
entry.data[CONF_PASSWORD],
_LOGGER,
)
coordinator = IstaCoordinator(hass, entry, ista)

View File

@@ -51,7 +51,6 @@ class IstaConfigFlow(ConfigFlow, domain=DOMAIN):
ista = PyEcotrendIsta(
user_input[CONF_EMAIL],
user_input[CONF_PASSWORD],
_LOGGER,
)
try:
await self.hass.async_add_executor_job(ista.login)
@@ -102,7 +101,6 @@ class IstaConfigFlow(ConfigFlow, domain=DOMAIN):
ista = PyEcotrendIsta(
user_input[CONF_EMAIL],
user_input[CONF_PASSWORD],
_LOGGER,
)
def get_consumption_units() -> set[str]:

View File

@@ -94,10 +94,8 @@ class IstaCoordinator(DataUpdateCoordinator[dict[str, Any]]):
result = self.ista.get_consumption_unit_details()
return {
consumption_unit: next(
details
for details in result["consumptionUnits"]
if details["id"] == consumption_unit
)
consumption_unit: details
for consumption_unit in self.ista.get_uuids()
for details in result["consumptionUnits"]
if details["id"] == consumption_unit
}