Skip to content

[pull] dev from home-assistant:dev #779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 8, 2025
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
8 changes: 4 additions & 4 deletions homeassistant/components/amazon_devices/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def __init__(
"""Initialize the entity."""
super().__init__(coordinator)
self._serial_num = serial_num
model_details = coordinator.api.get_model_details(self.device)
model = model_details["model"] if model_details else None
model_details = coordinator.api.get_model_details(self.device) or {}
model = model_details.get("model")
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, serial_num)},
name=self.device.account_name,
model=model,
model_id=self.device.device_type,
manufacturer="Amazon",
hw_version=model_details["hw_version"] if model_details else None,
manufacturer=model_details.get("manufacturer", "Amazon"),
hw_version=model_details.get("hw_version"),
sw_version=(
self.device.software_version if model != SPEAKER_GROUP_MODEL else None
),
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"mqtt": ["esphome/discover/#"],
"quality_scale": "platinum",
"requirements": [
"aioesphomeapi==32.0.0",
"aioesphomeapi==32.2.0",
"esphome-dashboard-api==1.3.0",
"bleak-esphome==2.16.0"
],
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/linkplay/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ async def async_step_zeroconf(
) -> ConfigFlowResult:
"""Handle Zeroconf discovery."""

# Do not probe the device if the host is already configured
self._async_abort_entries_match({CONF_HOST: discovery_info.host})

session: ClientSession = await async_get_client_session(self.hass)
bridge: LinkPlayBridge | None = None

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/synology_dsm/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"documentation": "https://www.home-assistant.io/integrations/synology_dsm",
"iot_class": "local_polling",
"loggers": ["synology_dsm"],
"requirements": ["py-synologydsm-api==2.7.2"],
"requirements": ["py-synologydsm-api==2.7.3"],
"ssdp": [
{
"manufacturer": "Synology",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/unifiprotect/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"integration_type": "hub",
"iot_class": "local_push",
"loggers": ["uiprotect", "unifi_discovery"],
"requirements": ["uiprotect==7.11.0", "unifi-discovery==1.2.0"],
"requirements": ["uiprotect==7.12.0", "unifi-discovery==1.2.0"],
"ssdp": [
{
"manufacturer": "Ubiquiti Networks",
Expand Down
6 changes: 3 additions & 3 deletions requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions tests/components/linkplay/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,28 @@ async def test_user_flow_errors(
CONF_HOST: HOST,
}
assert result["result"].unique_id == UUID


@pytest.mark.usefixtures("mock_linkplay_factory_bridge")
async def test_zeroconf_no_probe_existing_device(
hass: HomeAssistant, mock_linkplay_factory_bridge: AsyncMock
) -> None:
"""Test we do not probe the device is the host is already configured."""
entry = MockConfigEntry(
data={CONF_HOST: HOST},
domain=DOMAIN,
title=NAME,
unique_id=UUID,
)
entry.add_to_hass(hass)

result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": SOURCE_ZEROCONF},
data=ZEROCONF_DISCOVERY,
)
await hass.async_block_till_done()

assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "already_configured"
assert len(mock_linkplay_factory_bridge.mock_calls) == 0