Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f5fa2e2
Improve person tests (#172997)
emontnemery Jun 4, 2026
11535f2
Bump imgw_pib to 2.2.2 (#172999)
bieniu Jun 4, 2026
2b499d5
Updated pajgps-api to version 0.4.0 (#172986)
skipperro Jun 4, 2026
682f0ba
Use DOMAIN constant in test (config_entries.flow.async_init) (#173008)
epenet Jun 4, 2026
9e1abe6
Remove duplicate description in Tuya binary sensor (#173006)
epenet Jun 4, 2026
90d4543
Use DOMAIN constant in tests (async_mock_service) (#173002)
epenet Jun 4, 2026
cbc7a5a
Use DOMAIN constant in tests (hass.services.async_call) (#172998)
epenet Jun 4, 2026
eb2a3d0
Prefer DOMAIN constant over config_flow.DOMAIN in tests (#172992)
epenet Jun 4, 2026
863655d
Fix SleepIQ 401 storm by isolating client session cookies (#172276)
Stormalong Jun 4, 2026
53211bc
Add tests for the envisalink integration (#172621)
kohai-ut Jun 4, 2026
bde3b6e
Add filter reset button to Helty Flow (#172866)
ebaschiera Jun 4, 2026
f36a491
Fix double annotations for Pylint (#172477)
joostlek Jun 4, 2026
5b4c2c6
Homee: Add stop_tilt action for covers (#172952)
Taraman17 Jun 4, 2026
04d2211
Refactor Yardian zones into sub-devices using via_device (#172835)
aeon-matrix Jun 4, 2026
a7f0123
Switchbot Cloud: Fixed an issue where condition filtering for enabled…
XiaoLing-git Jun 4, 2026
50de2c0
Use DOMAIN constant in test (hass.states.async_entity_ids) (#173009)
epenet Jun 4, 2026
9f5cb63
Upgrade Swisscom integration (#171816)
anatosun Jun 4, 2026
1cbbce5
Fix person in_zones propagation from scanner in home zone (#173007)
emontnemery Jun 4, 2026
5cc1a0a
Add Motionblinds virtual integration Avosdim (#172821)
mbo18 Jun 4, 2026
ffc6eea
Always include template errors in trace (#172917)
emontnemery Jun 4, 2026
3c2f171
Bump pyyardian to 1.4.0 (#173020)
aeon-matrix Jun 4, 2026
3aa4cbe
Add icon translations for Blebox integration (#172565)
bkobus-bbx Jun 4, 2026
fc2b790
Bump av to 17.0.1 (#172892)
RaHehl Jun 4, 2026
ad2db2a
Add exception translations for Blebox integration (#172560)
bkobus-bbx Jun 4, 2026
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
1 change: 1 addition & 0 deletions homeassistant/components/avosdim/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Virtual integration: Avosdim."""
6 changes: 6 additions & 0 deletions homeassistant/components/avosdim/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"domain": "avosdim",
"name": "Avosdim",
"integration_type": "virtual",
"supported_by": "motion_blinds"
}
36 changes: 20 additions & 16 deletions homeassistant/components/blebox/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import blebox_uniapi.button

from homeassistant.components.button import ButtonEntity
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

Expand All @@ -13,6 +13,16 @@

PARALLEL_UPDATES = 1

BUTTON_TYPES: dict[str, ButtonEntityDescription] = {
"up": ButtonEntityDescription(key="up", translation_key="up"),
"down": ButtonEntityDescription(key="down", translation_key="down"),
"fav": ButtonEntityDescription(key="fav", translation_key="fav"),
"open": ButtonEntityDescription(key="open", translation_key="open"),
"close": ButtonEntityDescription(key="close", translation_key="close"),
}

_DEFAULT_BUTTON = ButtonEntityDescription(key="button")


async def async_setup_entry(
hass: HomeAssistant,
Expand All @@ -35,22 +45,16 @@ def __init__(
self, coordinator: BleBoxCoordinator, feature: blebox_uniapi.button.Button
) -> None:
"""Initialize a BleBox button feature."""

super().__init__(coordinator, feature)
self._attr_icon = self.get_icon()

def get_icon(self) -> str | None:
"""Return icon for endpoint."""
if "up" in self._feature.query_string:
return "mdi:arrow-up-circle"
if "down" in self._feature.query_string:
return "mdi:arrow-down-circle"
if "fav" in self._feature.query_string:
return "mdi:heart-circle"
if "open" in self._feature.query_string:
return "mdi:arrow-up-circle"
if "close" in self._feature.query_string:
return "mdi:arrow-down-circle"
return None
self.entity_description = self._get_description()

def _get_description(self) -> ButtonEntityDescription:
"""Return the description matching this button's query string."""
for key, description in BUTTON_TYPES.items():
if key in self._feature.query_string:
return description
return _DEFAULT_BUTTON

@blebox_command
async def async_press(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/blebox/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ async def _async_update_data(self) -> None:
except Error as err:
raise UpdateFailed(
translation_domain=DOMAIN,
translation_key="update_failed",
translation_key="data_update_failed",
translation_placeholders={"error": str(err)},
) from err
26 changes: 26 additions & 0 deletions homeassistant/components/blebox/icons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"entity": {
"button": {
"close": {
"default": "mdi:arrow-down-circle"
},
"down": {
"default": "mdi:arrow-down-circle"
},
"fav": {
"default": "mdi:heart-circle"
},
"open": {
"default": "mdi:arrow-up-circle"
},
"up": {
"default": "mdi:arrow-up-circle"
}
},
"sensor": {
"power_consumption": {
"default": "mdi:lightning-bolt"
}
}
}
}
16 changes: 10 additions & 6 deletions homeassistant/components/blebox/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
LightEntityFeature,
)
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

from . import BleBoxConfigEntry
from .const import LIGHT_MAX_KELVINS, LIGHT_MIN_KELVINS
from .const import DOMAIN, LIGHT_MAX_KELVINS, LIGHT_MIN_KELVINS
from .coordinator import BleBoxCoordinator
from .entity import BleBoxEntity
from .util import blebox_command
Expand Down Expand Up @@ -215,18 +216,21 @@ async def async_turn_on(self, **kwargs: Any) -> None:
try:
await self._feature.async_on(value)
except ValueError as exc:
raise ValueError(
f"Turning on '{self.name}' failed: Bad value {value}"
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="bad_value",
translation_placeholders={"error": str(exc)},
) from exc

if effect is not None:
try:
effect_value = self.effect_list.index(effect)
await self._feature.async_api_command("effect", effect_value)
except ValueError as exc:
raise ValueError(
f"Turning on with effect '{self.name}' failed: {effect} not in"
" effect list."
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="effect_not_found",
translation_placeholders={"error": str(exc)},
) from exc

@blebox_command
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/blebox/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
),
SensorEntityDescription(
key="powerConsumption",
translation_key="power_consumption",
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
suggested_display_precision=2,
icon="mdi:lightning-bolt",
),
SensorEntityDescription(
key="humidity",
Expand Down
17 changes: 16 additions & 1 deletion homeassistant/components/blebox/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,23 @@
}
},
"exceptions": {
"update_failed": {
"bad_value": {
"message": "Turning on the light failed: {error}"
},
"command_failed": {
"message": "Failed to execute command on the BleBox device: {error}"
},
"data_update_failed": {
"message": "An error occurred while communicating with the BleBox device: {error}"
},
"effect_not_found": {
"message": "The specified light effect is not available on this device: {error}"
},
"install_failed": {
"message": "Failed to install firmware update on the BleBox device: {error}"
},
"update_failed": {
"message": "Failed to fetch firmware update information from the BleBox device: {error}"
}
}
}
13 changes: 11 additions & 2 deletions homeassistant/components/blebox/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from homeassistant.helpers.event import async_call_later

from . import BleBoxConfigEntry
from .const import DOMAIN
from .coordinator import BleBoxCoordinator
from .entity import BleBoxEntity

Expand Down Expand Up @@ -86,7 +87,11 @@ async def async_update(self) -> None:
try:
await self._feature.async_update()
except Error as ex:
raise HomeAssistantError(ex) from ex
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="update_failed",
translation_placeholders={"error": str(ex)},
) from ex
self._sync_sw_version()

@property
Expand Down Expand Up @@ -121,7 +126,11 @@ async def async_install(
await self._feature.async_install()
except Error as ex:
self._reset_progress()
raise HomeAssistantError(ex) from ex
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="install_failed",
translation_placeholders={"error": str(ex)},
) from ex
self._poll_cancel = async_call_later(
self.hass, _POLL_INTERVAL_SECONDS, self._poll_until_updated
)
Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/blebox/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from homeassistant.exceptions import HomeAssistantError

from .const import DOMAIN
from .entity import BleBoxEntity


Expand All @@ -22,7 +23,11 @@ async def handler(self: _BleBoxEntityT, *args: _P.args, **kwargs: _P.kwargs) ->
try:
return await func(self, *args, **kwargs)
except Error as err:
raise HomeAssistantError(str(err)) from err
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="command_failed",
translation_placeholders={"error": str(err)},
) from err
finally:
await self.coordinator.async_refresh()

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/generic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/generic",
"integration_type": "device",
"iot_class": "local_push",
"requirements": ["av==16.0.1", "Pillow==12.2.0"]
"requirements": ["av==17.0.1", "Pillow==12.2.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/helty/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .coordinator import HeltyConfigEntry, HeltyDataUpdateCoordinator

PLATFORMS: list[Platform] = [Platform.FAN, Platform.SENSOR]
PLATFORMS: list[Platform] = [Platform.BUTTON, Platform.FAN, Platform.SENSOR]


async def async_setup_entry(hass: HomeAssistant, entry: HeltyConfigEntry) -> bool:
Expand Down
47 changes: 47 additions & 0 deletions homeassistant/components/helty/button.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""Button platform for the Helty Flow integration."""

from pyhelty import HeltyError

from homeassistant.components.button import ButtonEntity
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

from .const import DOMAIN
from .coordinator import HeltyConfigEntry, HeltyDataUpdateCoordinator
from .entity import HeltyEntity

PARALLEL_UPDATES = 0


async def async_setup_entry(
hass: HomeAssistant,
entry: HeltyConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback,
) -> None:
"""Set up the Helty buttons."""
async_add_entities([HeltyResetFilterButton(entry.runtime_data)])


class HeltyResetFilterButton(HeltyEntity, ButtonEntity):
"""Resets the filter-life counter after the filter has been replaced."""

_attr_entity_category = EntityCategory.CONFIG
_attr_translation_key = "reset_filter"

def __init__(self, coordinator: HeltyDataUpdateCoordinator) -> None:
"""Initialize the button."""
super().__init__(coordinator)
self._attr_unique_id = f"{self._device_id}_reset_filter"

async def async_press(self) -> None:
"""Reset the filter-life counter."""
try:
await self.coordinator.client.async_reset_filter()
except HeltyError as err:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="reset_filter_failed",
) from err
await self.coordinator.async_request_refresh()
13 changes: 10 additions & 3 deletions homeassistant/components/helty/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

from typing import Any

from pyhelty import FanMode
from pyhelty import FanMode, HeltyError

from homeassistant.components.fan import FanEntity, FanEntityFeature
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.util.percentage import (
ordered_list_item_to_percentage,
percentage_to_ordered_list_item,
)

from .const import PRESET_BOOST, PRESET_FREE_COOLING, PRESET_NIGHT
from .const import DOMAIN, PRESET_BOOST, PRESET_FREE_COOLING, PRESET_NIGHT
from .coordinator import HeltyConfigEntry, HeltyDataUpdateCoordinator
from .entity import HeltyEntity

Expand Down Expand Up @@ -116,5 +117,11 @@ async def async_turn_off(self, **kwargs: Any) -> None:
await self._async_set_mode(FanMode.OFF)

async def _async_set_mode(self, mode: FanMode) -> None:
await self.coordinator.client.async_set_fan_mode(mode)
try:
await self.coordinator.client.async_set_fan_mode(mode)
except HeltyError as err:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="set_fan_mode_failed",
) from err
await self.coordinator.async_request_refresh()
4 changes: 1 addition & 3 deletions homeassistant/components/helty/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ rules:
unique-config-entry: done

# Silver
action-exceptions:
status: exempt
comment: This integration does not provide additional actions.
action-exceptions: done
config-entry-unloading: done
docs-configuration-parameters:
status: exempt
Expand Down
13 changes: 13 additions & 0 deletions homeassistant/components/helty/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
}
},
"entity": {
"button": {
"reset_filter": {
"name": "Reset filter"
}
},
"sensor": {
"indoor_humidity": {
"name": "Indoor humidity"
Expand All @@ -31,5 +36,13 @@
"name": "Outdoor temperature"
}
}
},
"exceptions": {
"reset_filter_failed": {
"message": "Failed to reset the filter."
},
"set_fan_mode_failed": {
"message": "Failed to set the ventilation mode."
}
}
}
Loading
Loading