mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Adjust config entry state checks in renault (#138910)
This commit is contained in:
parent
e79a1a52c3
commit
1392bab4d5
@ -9,7 +9,6 @@ from typing import TYPE_CHECKING, Any
|
|||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntryState
|
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
from homeassistant.exceptions import ServiceValidationError
|
from homeassistant.exceptions import ServiceValidationError
|
||||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||||
@ -178,9 +177,8 @@ def setup_services(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
loaded_entries: list[RenaultConfigEntry] = [
|
loaded_entries: list[RenaultConfigEntry] = [
|
||||||
entry
|
entry
|
||||||
for entry in hass.config_entries.async_entries(DOMAIN)
|
for entry in hass.config_entries.async_loaded_entries(DOMAIN)
|
||||||
if entry.state == ConfigEntryState.LOADED
|
if entry.entry_id in device_entry.config_entries
|
||||||
and entry.entry_id in device_entry.config_entries
|
|
||||||
]
|
]
|
||||||
for entry in loaded_entries:
|
for entry in loaded_entries:
|
||||||
for vin, vehicle in entry.runtime_data.vehicles.items():
|
for vin, vehicle in entry.runtime_data.vehicles.items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user