Use unique_id for config_entries of HomematicIP Cloud (#31133)
* use hapid as unique_id for config_entry of HomematicIP Cloud * Add qualita_scale to manifest * Update config_flow * use core interface for config_flow tests * refactor to fail earlier * use asynctest * rewrite tests * rewrite tests * fix test * add assert
This commit is contained in:
1 parent
3f03848a07
commit
1b3c4ed4b3
15 files changed
+254
-250
No files matched your search
@@ -34,7 +34,7 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from . import DOMAIN as HMIPC_DOMAIN, HMIPC_HAPID, HomematicipGenericDevice
|
||||
from . import DOMAIN as HMIPC_DOMAIN, HomematicipGenericDevice
|
||||
from .device import ATTR_IS_GROUP, ATTR_MODEL_TYPE
|
||||
from .hap import HomematicipHAP
|
||||
|
||||
@@ -60,7 +60,7 @@ async def async_setup_entry(
|
||||
hass: HomeAssistantType, config_entry: ConfigEntry, async_add_entities
|
||||
) -> None:
|
||||
"""Set up the HomematicIP Cloud sensors from a config entry."""
|
||||
hap = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]]
|
||||
hap = hass.data[HMIPC_DOMAIN][config_entry.unique_id]
|
||||
entities = [HomematicipAccesspointStatus(hap)]
|
||||
for device in hap.home.devices:
|
||||
if isinstance(device, (AsyncHeatingThermostat, AsyncHeatingThermostatCompact)):
|
||||
|
||||
Reference in new issue
Block a user