Skip to content

Commit ab5d1d2

Browse files
authored
2 parents 0cda883 + 1c10b85 commit ab5d1d2

File tree

96 files changed

+1345
-489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1345
-489
lines changed

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

homeassistant/components/accuweather/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"integration_type": "service",
88
"iot_class": "cloud_polling",
99
"loggers": ["accuweather"],
10-
"requirements": ["accuweather==4.2.0"],
10+
"requirements": ["accuweather==4.2.1"],
1111
"single_config_entry": true
1212
}

homeassistant/components/aladdin_connect/__init__.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from genie_partner_sdk.client import AladdinConnectClient
6-
from genie_partner_sdk.model import GarageDoor
76

87
from homeassistant.const import Platform
98
from homeassistant.core import HomeAssistant
@@ -36,22 +35,7 @@ async def async_setup_entry(
3635
api.AsyncConfigEntryAuth(aiohttp_client.async_get_clientsession(hass), session)
3736
)
3837

39-
sdk_doors = await client.get_doors()
40-
41-
# Convert SDK GarageDoor objects to integration GarageDoor objects
42-
doors = [
43-
GarageDoor(
44-
{
45-
"device_id": door.device_id,
46-
"door_number": door.door_number,
47-
"name": door.name,
48-
"status": door.status,
49-
"link_status": door.link_status,
50-
"battery_level": door.battery_level,
51-
}
52-
)
53-
for door in sdk_doors
54-
]
38+
doors = await client.get_doors()
5539

5640
entry.runtime_data = {
5741
door.unique_id: AladdinConnectCoordinator(hass, entry, client, door)

homeassistant/components/aladdin_connect/coordinator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,10 @@ def __init__(
4141
async def _async_update_data(self) -> GarageDoor:
4242
"""Fetch data from the Aladdin Connect API."""
4343
await self.client.update_door(self.data.device_id, self.data.door_number)
44+
self.data.status = self.client.get_door_status(
45+
self.data.device_id, self.data.door_number
46+
)
47+
self.data.battery_level = self.client.get_battery_status(
48+
self.data.device_id, self.data.door_number
49+
)
4450
return self.data

homeassistant/components/aladdin_connect/cover.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ async def async_close_cover(self, **kwargs: Any) -> None:
4949
@property
5050
def is_closed(self) -> bool | None:
5151
"""Update is closed attribute."""
52-
return self.coordinator.data.status == "closed"
52+
if (status := self.coordinator.data.status) is None:
53+
return None
54+
return status == "closed"
5355

5456
@property
5557
def is_closing(self) -> bool | None:

homeassistant/components/aladdin_connect/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"documentation": "https://www.home-assistant.io/integrations/aladdin_connect",
88
"integration_type": "hub",
99
"iot_class": "cloud_polling",
10-
"requirements": ["genie-partner-sdk==1.0.10"]
10+
"requirements": ["genie-partner-sdk==1.0.11"]
1111
}

homeassistant/components/alexa_devices/__init__.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from homeassistant.helpers import aiohttp_client, config_validation as cv
66
from homeassistant.helpers.typing import ConfigType
77

8-
from .const import _LOGGER, CONF_LOGIN_DATA, COUNTRY_DOMAINS, DOMAIN
8+
from .const import _LOGGER, CONF_LOGIN_DATA, CONF_SITE, COUNTRY_DOMAINS, DOMAIN
99
from .coordinator import AmazonConfigEntry, AmazonDevicesCoordinator
1010
from .services import async_setup_services
1111

@@ -42,7 +42,23 @@ async def async_setup_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bo
4242

4343
async def async_migrate_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bool:
4444
"""Migrate old entry."""
45-
if entry.version == 1 and entry.minor_version == 1:
45+
46+
if entry.version == 1 and entry.minor_version < 3:
47+
if CONF_SITE in entry.data:
48+
# Site in data (wrong place), just move to login data
49+
new_data = entry.data.copy()
50+
new_data[CONF_LOGIN_DATA][CONF_SITE] = new_data[CONF_SITE]
51+
new_data.pop(CONF_SITE)
52+
hass.config_entries.async_update_entry(
53+
entry, data=new_data, version=1, minor_version=3
54+
)
55+
return True
56+
57+
if CONF_SITE in entry.data[CONF_LOGIN_DATA]:
58+
# Site is there, just update version to avoid future migrations
59+
hass.config_entries.async_update_entry(entry, version=1, minor_version=3)
60+
return True
61+
4662
_LOGGER.debug(
4763
"Migrating from version %s.%s", entry.version, entry.minor_version
4864
)
@@ -53,10 +69,10 @@ async def async_migrate_entry(hass: HomeAssistant, entry: AmazonConfigEntry) ->
5369

5470
# Add site to login data
5571
new_data = entry.data.copy()
56-
new_data[CONF_LOGIN_DATA]["site"] = f"https://www.amazon.{domain}"
72+
new_data[CONF_LOGIN_DATA][CONF_SITE] = f"https://www.amazon.{domain}"
5773

5874
hass.config_entries.async_update_entry(
59-
entry, data=new_data, version=1, minor_version=2
75+
entry, data=new_data, version=1, minor_version=3
6076
)
6177

6278
_LOGGER.info(

homeassistant/components/alexa_devices/config_flow.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN):
5252
"""Handle a config flow for Alexa Devices."""
5353

5454
VERSION = 1
55-
MINOR_VERSION = 2
55+
MINOR_VERSION = 3
5656

5757
async def async_step_user(
5858
self, user_input: dict[str, Any] | None = None
@@ -107,7 +107,9 @@ async def async_step_reauth_confirm(
107107

108108
if user_input is not None:
109109
try:
110-
await validate_input(self.hass, {**reauth_entry.data, **user_input})
110+
data = await validate_input(
111+
self.hass, {**reauth_entry.data, **user_input}
112+
)
111113
except CannotConnect:
112114
errors["base"] = "cannot_connect"
113115
except (CannotAuthenticate, TypeError):
@@ -119,8 +121,9 @@ async def async_step_reauth_confirm(
119121
reauth_entry,
120122
data={
121123
CONF_USERNAME: entry_data[CONF_USERNAME],
122-
CONF_PASSWORD: entry_data[CONF_PASSWORD],
124+
CONF_PASSWORD: user_input[CONF_PASSWORD],
123125
CONF_CODE: user_input[CONF_CODE],
126+
CONF_LOGIN_DATA: data,
124127
},
125128
)
126129

homeassistant/components/alexa_devices/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
DOMAIN = "alexa_devices"
88
CONF_LOGIN_DATA = "login_data"
9+
CONF_SITE = "site"
910

1011
DEFAULT_DOMAIN = "com"
1112
COUNTRY_DOMAINS = {

homeassistant/components/bluetooth/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"bluetooth-auto-recovery==1.5.2",
2222
"bluetooth-data-tools==1.28.2",
2323
"dbus-fast==2.44.3",
24-
"habluetooth==5.3.0"
24+
"habluetooth==5.6.2"
2525
]
2626
}

0 commit comments

Comments
 (0)