Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions homeassistant/components/iaqualink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.httpx_client import get_async_client
Expand Down Expand Up @@ -104,6 +105,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: AqualinkConfigEntry) ->
f"Error while attempting to retrieve devices list: {svc_exception}"
) from svc_exception

device_registry = dr.async_get(hass)
device_registry.async_get_or_create(
config_entry_id=entry.entry_id,
name=system.name,
identifiers={(DOMAIN, system.serial)},
manufacturer="Jandy",
serial_number=system.serial,
)

for dev in devices.values():
if isinstance(dev, AqualinkThermostat):
runtime_data.thermostats += [dev]
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/iaqualink/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, dev: AqualinkDeviceT) -> None:
self._attr_unique_id = f"{dev.system.serial}_{dev.name}"
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self._attr_unique_id)},
via_device=(DOMAIN, dev.system.serial),
manufacturer=dev.manufacturer,
model=dev.model,
name=dev.label,
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/template/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
"title": "[%key:component::update::entity_component::_::state_attributes::title::name%]",
"backup": "Backup",
"specific_version": "Specific version",
"update_percent": "Update percentage"
"update_percentage": "Update percentage"
},
"data_description": {
"device_id": "[%key:component::template::common::device_id_description%]",
Expand All @@ -452,7 +452,7 @@
"title": "Defines a template to get the update title.",
"backup": "Enable or disable the `automatic backup before update` option in the update repair. When disabled, the `backup` variable will always provide `False` during the `install` action and it will not accept the `backup` option.",
"specific_version": "Enable or disable using the `version` variable with the `install` action. When disabled, the `specific_version` variable will always provide `None` in the `install` actions",
"update_percent": "Defines a template to get the update completion percentage."
"update_percentage": "Defines a template to get the update completion percentage."
},
"sections": {
"advanced_options": {
Expand Down Expand Up @@ -910,7 +910,7 @@
"title": "[%key:component::update::entity_component::_::state_attributes::title::name%]",
"backup": "[%key:component::template::config::step::update::data::backup%]",
"specific_version": "[%key:component::template::config::step::update::data::specific_version%]",
"update_percent": "[%key:component::template::config::step::update::data::update_percent%]"
"update_percentage": "[%key:component::template::config::step::update::data::update_percentage%]"
},
"data_description": {
"device_id": "[%key:component::template::common::device_id_description%]",
Expand All @@ -923,7 +923,7 @@
"title": "[%key:component::template::config::step::update::data_description::title%]",
"backup": "[%key:component::template::config::step::update::data_description::backup%]",
"specific_version": "[%key:component::template::config::step::update::data_description::specific_version%]",
"update_percent": "[%key:component::template::config::step::update::data_description::update_percent%]"
"update_percentage": "[%key:component::template::config::step::update::data_description::update_percentage%]"
},
"sections": {
"advanced_options": {
Expand Down
1 change: 1 addition & 0 deletions tests/components/iaqualink/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def get_aqualink_system(aqualink, cls=None, data=None):
data = {}

num = random.randint(0, 99999)
data["name"] = "Pool"
data["serial_number"] = f"SN{num:05}"

return cls(aqualink=aqualink, data=data)
Expand Down
Loading