Skip to content

Commit

Permalink
2024.8.3 (#124569)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Aug 25, 2024
2 parents 94516de + 2d5289e commit 516f329
Show file tree
Hide file tree
Showing 49 changed files with 669 additions and 92 deletions.
4 changes: 3 additions & 1 deletion homeassistant/components/airgradient/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ async def async_step_user(
except AirGradientError:
errors["base"] = "cannot_connect"
else:
await self.async_set_unique_id(current_measures.serial_number)
await self.async_set_unique_id(
current_measures.serial_number, raise_on_progress=False
)
self._abort_if_unique_id_configured()
await self.set_configuration_source()
return self.async_create_entry(
Expand Down
9 changes: 6 additions & 3 deletions homeassistant/components/alexa/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,12 @@ def default_display_categories(self) -> list[str]:
def interfaces(self) -> Generator[AlexaCapability]:
"""Yield the supported interfaces."""
yield AlexaPowerController(self.entity)
yield AlexaModeController(
self.entity, instance=f"{remote.DOMAIN}.{remote.ATTR_ACTIVITY}"
)
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
activities = self.entity.attributes.get(remote.ATTR_ACTIVITY_LIST) or []
if activities and supported & remote.RemoteEntityFeature.ACTIVITY:
yield AlexaModeController(
self.entity, instance=f"{remote.DOMAIN}.{remote.ATTR_ACTIVITY}"
)
yield AlexaEndpointHealth(self.hass, self.entity)
yield Alexa(self.entity)

Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/august/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import aiohttp
import voluptuous as vol
from yalexs.authenticator import ValidationResult
from yalexs.const import BRANDS, DEFAULT_BRAND
from yalexs.authenticator_common import ValidationResult
from yalexs.const import BRANDS_WITHOUT_OAUTH, DEFAULT_BRAND
from yalexs.manager.exceptions import CannotConnect, InvalidAuth, RequireValidation

from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
Expand Down Expand Up @@ -118,7 +118,7 @@ async def async_step_user_validate(
vol.Required(
CONF_BRAND,
default=self._user_auth_details.get(CONF_BRAND, DEFAULT_BRAND),
): vol.In(BRANDS),
): vol.In(BRANDS_WITHOUT_OAUTH),
vol.Required(
CONF_LOGIN_METHOD,
default=self._user_auth_details.get(
Expand Down Expand Up @@ -208,7 +208,7 @@ async def async_step_reauth_validate(
vol.Required(
CONF_BRAND,
default=self._user_auth_details.get(CONF_BRAND, DEFAULT_BRAND),
): vol.In(BRANDS),
): vol.In(BRANDS_WITHOUT_OAUTH),
vol.Required(CONF_PASSWORD): str,
}
),
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/august/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
"documentation": "https://www.home-assistant.io/integrations/august",
"iot_class": "cloud_push",
"loggers": ["pubnub", "yalexs"],
"requirements": ["yalexs==6.4.3", "yalexs-ble==2.4.3"]
"requirements": ["yalexs==8.4.1", "yalexs-ble==2.4.3"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/braviatv/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"integration_type": "device",
"iot_class": "local_polling",
"loggers": ["pybravia"],
"requirements": ["pybravia==0.3.3"],
"requirements": ["pybravia==0.3.4"],
"ssdp": [
{
"st": "urn:schemas-sony-com:service:ScalarWebAPI:1",
Expand Down
9 changes: 8 additions & 1 deletion homeassistant/components/habitica/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ async def _async_update_data(self) -> HabiticaData:
try:
user_response = await self.api.user.get()
tasks_response = await self.api.tasks.user.get()
tasks_response.extend(await self.api.tasks.user.get(type="completedTodos"))
tasks_response.extend(
[
{"id": task["_id"], **task}
for task in await self.api.tasks.user.get(type="completedTodos")
if task.get("_id")
]
)

except ClientResponseError as error:
raise UpdateFailed(f"Error communicating with API: {error}") from error

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/holiday/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/holiday",
"iot_class": "local_polling",
"requirements": ["holidays==0.53", "babel==2.15.0"]
"requirements": ["holidays==0.55", "babel==2.15.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"documentation": "https://www.home-assistant.io/integrations/homekit_controller",
"iot_class": "local_push",
"loggers": ["aiohomekit", "commentjson"],
"requirements": ["aiohomekit==3.2.2"],
"requirements": ["aiohomekit==3.2.3"],
"zeroconf": ["_hap._tcp.local.", "_hap._udp.local."]
}
2 changes: 1 addition & 1 deletion homeassistant/components/homeworks/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/homeworks",
"iot_class": "local_push",
"loggers": ["pyhomeworks"],
"requirements": ["pyhomeworks==1.1.1"]
"requirements": ["pyhomeworks==1.1.2"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/hue/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"iot_class": "local_push",
"loggers": ["aiohue"],
"quality_scale": "platinum",
"requirements": ["aiohue==4.7.2"],
"requirements": ["aiohue==4.7.3"],
"zeroconf": ["_hue._tcp.local."]
}
6 changes: 3 additions & 3 deletions homeassistant/components/hue/v2/hue_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def handle_rotary_event(evt_type: EventType, hue_resource: RelativeRotary) -> No
CONF_DEVICE_ID: device.id, # type: ignore[union-attr]
CONF_UNIQUE_ID: hue_resource.id,
CONF_TYPE: hue_resource.relative_rotary.rotary_report.action.value,
CONF_SUBTYPE: hue_resource.relative_rotary.last_event.rotation.direction.value,
CONF_DURATION: hue_resource.relative_rotary.last_event.rotation.duration,
CONF_STEPS: hue_resource.relative_rotary.last_event.rotation.steps,
CONF_SUBTYPE: hue_resource.relative_rotary.rotary_report.rotation.direction.value,
CONF_DURATION: hue_resource.relative_rotary.rotary_report.rotation.duration,
CONF_STEPS: hue_resource.relative_rotary.rotary_report.rotation.steps,
}
hass.bus.async_fire(ATTR_HUE_EVENT, data)

Expand Down
6 changes: 4 additions & 2 deletions homeassistant/components/integration/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
"round": "[%key:component::integration::config::step::user::data::round%]",
"source": "[%key:component::integration::config::step::user::data::source%]",
"unit_prefix": "[%key:component::integration::config::step::user::data::unit_prefix%]",
"unit_time": "[%key:component::integration::config::step::user::data::unit_time%]"
"unit_time": "[%key:component::integration::config::step::user::data::unit_time%]",
"max_sub_interval": "[%key:component::integration::config::step::user::data::max_sub_interval%]"
},
"data_description": {
"round": "[%key:component::integration::config::step::user::data_description::round%]",
"unit_prefix": "[%key:component::integration::config::step::user::data_description::unit_prefix%]",
"unit_time": "[%key:component::integration::config::step::user::data_description::unit_time%]"
"unit_time": "[%key:component::integration::config::step::user::data_description::unit_time%]",
"max_sub_interval": "[%key:component::integration::config::step::user::data_description::max_sub_interval%]"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/izone/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ class ZoneDevice(ClimateEntity):
_attr_name = None
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_target_temperature_step = 0.5
_attr_supported_features = (
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
)

def __init__(self, controller: ControllerDevice, zone: Zone) -> None:
"""Initialise ZoneDevice."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/knx/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"loggers": ["xknx", "xknxproject"],
"quality_scale": "platinum",
"requirements": [
"xknx==3.1.0",
"xknx==3.1.1",
"xknxproject==3.7.1",
"knx-frontend==2024.8.9.225351"
],
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/matter/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
(4456, 1011, "1.0.0", "2.00.00"),
(4488, 260, "1.0", "1.0.0"),
(4488, 514, "1.0", "1.0.0"),
(4921, 42, "1.0", "1.01.060"),
(4921, 43, "1.0", "1.01.060"),
(4999, 24875, "1.0", "27.0"),
(4999, 25057, "1.0", "27.0"),
(5009, 514, "1.0", "1.0.0"),
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/matter/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ def _update_from_device(self) -> None:
entity_category=EntityCategory.CONFIG,
translation_key="startup_on_off",
options=["On", "Off", "Toggle", "Previous"],
measurement_to_ha=lambda x: {
measurement_to_ha=lambda x: { # pylint: disable=unnecessary-lambda
0: "Off",
1: "On",
2: "Toggle",
None: "Previous",
}[x],
}.get(x),
ha_to_native_value=lambda x: {
"Off": 0,
"On": 1,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/nest/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"iot_class": "cloud_push",
"loggers": ["google_nest_sdm"],
"quality_scale": "platinum",
"requirements": ["google-nest-sdm==4.0.6"]
"requirements": ["google-nest-sdm==4.0.7"]
}
6 changes: 4 additions & 2 deletions homeassistant/components/nextbus/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ def has_routes(self) -> bool:

async def _async_update_data(self) -> dict[str, Any]:
"""Fetch data from NextBus."""
self.logger.debug("Updating data from API. Routes: %s", str(self._route_stops))

_route_stops = set(self._route_stops)
self.logger.debug("Updating data from API. Routes: %s", str(_route_stops))

def _update_data() -> dict:
"""Fetch data from NextBus."""
self.logger.debug("Updating data from API (executor)")
predictions: dict[RouteStop, dict[str, Any]] = {}
for route_stop in self._route_stops:
for route_stop in _route_stops:
prediction_results: list[dict[str, Any]] = []
try:
prediction_results = self.client.predictions_for_stop(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/roborock/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"iot_class": "local_polling",
"loggers": ["roborock"],
"requirements": [
"python-roborock==2.5.0",
"python-roborock==2.6.0",
"vacuum-map-parser-roborock==0.1.2"
]
}
6 changes: 5 additions & 1 deletion homeassistant/components/shelly/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ def _async_handle_update(
self.entry.async_create_background_task(
self.hass, self._async_connected(), "rpc device init", eager_start=True
)
# Make sure entities are marked available
self.async_set_updated_data(None)
elif update_type is RpcUpdateType.DISCONNECTED:
self.entry.async_create_background_task(
Expand All @@ -690,6 +691,8 @@ def _async_handle_update(
"rpc device disconnected",
eager_start=True,
)
# Make sure entities are marked as unavailable
self.async_set_updated_data(None)
elif update_type is RpcUpdateType.STATUS:
self.async_set_updated_data(None)
if self.sleep_period:
Expand All @@ -711,7 +714,8 @@ async def shutdown(self) -> None:
"""Shutdown the coordinator."""
if self.device.connected:
try:
await async_stop_scanner(self.device)
if not self.sleep_period:
await async_stop_scanner(self.device)
await super().shutdown()
except InvalidAuthError:
self.entry.async_start_reauth(self.hass)
Expand Down
8 changes: 8 additions & 0 deletions homeassistant/components/shelly/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,14 @@ def __init__(self, coordinator: ShellyRpcCoordinator, key: str) -> None:
self._attr_unique_id = f"{coordinator.mac}-{key}"
self._attr_name = get_rpc_entity_name(coordinator.device, key)

@property
def available(self) -> bool:
"""Check if device is available and initialized or sleepy."""
coordinator = self.coordinator
return super().available and (
coordinator.device.initialized or bool(coordinator.sleep_period)
)

@property
def status(self) -> dict:
"""Device status by entity key."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/shelly/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"iot_class": "local_push",
"loggers": ["aioshelly"],
"quality_scale": "platinum",
"requirements": ["aioshelly==11.2.0"],
"requirements": ["aioshelly==11.2.4"],
"zeroconf": [
{
"type": "_http._tcp.local.",
Expand Down
11 changes: 9 additions & 2 deletions homeassistant/components/spotify/browse_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,17 @@ async def async_browse_media(

# Check for config entry specifier, and extract Spotify URI
parsed_url = yarl.URL(media_content_id)
host = parsed_url.host

if (
parsed_url.host is None
or (entry := hass.config_entries.async_get_entry(parsed_url.host)) is None
host is None
# config entry ids can be upper or lower case. Yarl always returns host
# names in lower case, so we need to look for the config entry in both
or (
entry := hass.config_entries.async_get_entry(host)
or hass.config_entries.async_get_entry(host.upper())
)
is None
or not isinstance(entry.runtime_data, HomeAssistantSpotifyData)
):
raise BrowseError("Invalid Spotify account specified")
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/thethingsnetwork/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/thethingsnetwork",
"integration_type": "hub",
"iot_class": "cloud_polling",
"requirements": ["ttn_client==1.1.0"]
"requirements": ["ttn_client==1.2.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/tplink_omada/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/tplink_omada",
"integration_type": "hub",
"iot_class": "local_polling",
"requirements": ["tplink-omada-client==1.3.12"]
"requirements": ["tplink-omada-client==1.4.2"]
}
1 change: 1 addition & 0 deletions homeassistant/components/vesync/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"LAP-C202S-WUSR": "Core200S", # Alt ID Model Core200S
"Core300S": "Core300S",
"LAP-C301S-WJP": "Core300S", # Alt ID Model Core300S
"LAP-C301S-WAAA": "Core300S", # Alt ID Model Core300S
"Core400S": "Core400S",
"LAP-C401S-WJP": "Core400S", # Alt ID Model Core400S
"LAP-C401S-WUSR": "Core400S", # Alt ID Model Core400S
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/wled/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ async def async_step_user(
except WLEDConnectionError:
errors["base"] = "cannot_connect"
else:
await self.async_set_unique_id(device.info.mac_address)
await self.async_set_unique_id(
device.info.mac_address, raise_on_progress=False
)
self._abort_if_unique_id_configured(
updates={CONF_HOST: user_input[CONF_HOST]}
)
Expand All @@ -56,8 +58,6 @@ async def async_step_user(
CONF_HOST: user_input[CONF_HOST],
},
)
else:
user_input = {}

return self.async_show_form(
step_id="user",
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/workday/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _get_obj_holidays(
subdiv=province,
years=year,
language=language,
categories=set_categories, # type: ignore[arg-type]
categories=set_categories,
)
if (supported_languages := obj_holidays.supported_languages) and language == "en":
for lang in supported_languages:
Expand All @@ -102,7 +102,7 @@ def _get_obj_holidays(
subdiv=province,
years=year,
language=lang,
categories=set_categories, # type: ignore[arg-type]
categories=set_categories,
)
LOGGER.debug("Changing language from %s to %s", language, lang)
return obj_holidays
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/workday/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "local_polling",
"loggers": ["holidays"],
"quality_scale": "internal",
"requirements": ["holidays==0.53"]
"requirements": ["holidays==0.55"]
}
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
APPLICATION_NAME: Final = "HomeAssistant"
MAJOR_VERSION: Final = 2024
MINOR_VERSION: Final = 8
PATCH_VERSION: Final = "2"
PATCH_VERSION: Final = "3"
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 12, 0)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ aiodhcpwatcher==1.0.2
aiodiscover==2.1.0
aiodns==3.2.0
aiohttp-fast-zlib==0.1.1
aiohttp==3.10.3
aiohttp==3.10.5
aiohttp_cors==0.7.0
aiozoneinfo==0.2.1
astral==2.2
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "homeassistant"
version = "2024.8.2"
version = "2024.8.3"
license = {text = "Apache-2.0"}
description = "Open-source home automation platform running on Python 3."
readme = "README.rst"
Expand All @@ -24,7 +24,7 @@ classifiers = [
requires-python = ">=3.12.0"
dependencies = [
"aiodns==3.2.0",
"aiohttp==3.10.3",
"aiohttp==3.10.5",
"aiohttp_cors==0.7.0",
"aiohttp-fast-zlib==0.1.1",
"aiozoneinfo==0.2.1",
Expand Down
Loading

0 comments on commit 516f329

Please sign in to comment.