Skip to content

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

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 17 commits into from
Jun 10, 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
13 changes: 10 additions & 3 deletions homeassistant/components/airgradient/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ def __init__(

async def _async_setup(self) -> None:
"""Set up the coordinator."""
self._current_version = (
await self.client.get_current_measures()
).firmware_version
try:
self._current_version = (
await self.client.get_current_measures()
).firmware_version
except AirGradientError as error:
raise UpdateFailed(
translation_domain=DOMAIN,
translation_key="update_error",
translation_placeholders={"error": str(error)},
) from error

async def _async_update_data(self) -> AirGradientData:
try:
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/amazon_devices/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback

Expand All @@ -34,10 +35,12 @@ class AmazonBinarySensorEntityDescription(BinarySensorEntityDescription):
AmazonBinarySensorEntityDescription(
key="online",
device_class=BinarySensorDeviceClass.CONNECTIVITY,
entity_category=EntityCategory.DIAGNOSTIC,
is_on_fn=lambda _device: _device.online,
),
AmazonBinarySensorEntityDescription(
key="bluetooth",
entity_category=EntityCategory.DIAGNOSTIC,
translation_key="bluetooth",
is_on_fn=lambda _device: _device.bluetooth_state,
),
Expand Down
110 changes: 0 additions & 110 deletions homeassistant/components/amazon_devices/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,116 +3,6 @@
"name": "Amazon Devices",
"codeowners": ["@chemelli74"],
"config_flow": true,
"dhcp": [
{ "macaddress": "007147*" },
{ "macaddress": "00FC8B*" },
{ "macaddress": "0812A5*" },
{ "macaddress": "086AE5*" },
{ "macaddress": "08849D*" },
{ "macaddress": "089115*" },
{ "macaddress": "08A6BC*" },
{ "macaddress": "08C224*" },
{ "macaddress": "0CDC91*" },
{ "macaddress": "0CEE99*" },
{ "macaddress": "1009F9*" },
{ "macaddress": "109693*" },
{ "macaddress": "10BF67*" },
{ "macaddress": "10CE02*" },
{ "macaddress": "140AC5*" },
{ "macaddress": "149138*" },
{ "macaddress": "1848BE*" },
{ "macaddress": "1C12B0*" },
{ "macaddress": "1C4D66*" },
{ "macaddress": "1C93C4*" },
{ "macaddress": "1CFE2B*" },
{ "macaddress": "244CE3*" },
{ "macaddress": "24CE33*" },
{ "macaddress": "2873F6*" },
{ "macaddress": "2C71FF*" },
{ "macaddress": "34AFB3*" },
{ "macaddress": "34D270*" },
{ "macaddress": "38F73D*" },
{ "macaddress": "3C5CC4*" },
{ "macaddress": "3CE441*" },
{ "macaddress": "440049*" },
{ "macaddress": "40A2DB*" },
{ "macaddress": "40A9CF*" },
{ "macaddress": "40B4CD*" },
{ "macaddress": "443D54*" },
{ "macaddress": "44650D*" },
{ "macaddress": "485F2D*" },
{ "macaddress": "48785E*" },
{ "macaddress": "48B423*" },
{ "macaddress": "4C1744*" },
{ "macaddress": "4CEFC0*" },
{ "macaddress": "5007C3*" },
{ "macaddress": "50D45C*" },
{ "macaddress": "50DCE7*" },
{ "macaddress": "50F5DA*" },
{ "macaddress": "5C415A*" },
{ "macaddress": "6837E9*" },
{ "macaddress": "6854FD*" },
{ "macaddress": "689A87*" },
{ "macaddress": "68B691*" },
{ "macaddress": "68DBF5*" },
{ "macaddress": "68F63B*" },
{ "macaddress": "6C0C9A*" },
{ "macaddress": "6C5697*" },
{ "macaddress": "7458F3*" },
{ "macaddress": "74C246*" },
{ "macaddress": "74D637*" },
{ "macaddress": "74E20C*" },
{ "macaddress": "74ECB2*" },
{ "macaddress": "786C84*" },
{ "macaddress": "78A03F*" },
{ "macaddress": "7C6166*" },
{ "macaddress": "7C6305*" },
{ "macaddress": "7CD566*" },
{ "macaddress": "8871E5*" },
{ "macaddress": "901195*" },
{ "macaddress": "90235B*" },
{ "macaddress": "90A822*" },
{ "macaddress": "90F82E*" },
{ "macaddress": "943A91*" },
{ "macaddress": "98226E*" },
{ "macaddress": "98CCF3*" },
{ "macaddress": "9CC8E9*" },
{ "macaddress": "A002DC*" },
{ "macaddress": "A0D2B1*" },
{ "macaddress": "A40801*" },
{ "macaddress": "A8E621*" },
{ "macaddress": "AC416A*" },
{ "macaddress": "AC63BE*" },
{ "macaddress": "ACCCFC*" },
{ "macaddress": "B0739C*" },
{ "macaddress": "B0CFCB*" },
{ "macaddress": "B0F7C4*" },
{ "macaddress": "B85F98*" },
{ "macaddress": "C091B9*" },
{ "macaddress": "C095CF*" },
{ "macaddress": "C49500*" },
{ "macaddress": "C86C3D*" },
{ "macaddress": "CC9EA2*" },
{ "macaddress": "CCF735*" },
{ "macaddress": "DC54D7*" },
{ "macaddress": "D8BE65*" },
{ "macaddress": "D8FBD6*" },
{ "macaddress": "DC91BF*" },
{ "macaddress": "DCA0D0*" },
{ "macaddress": "E0F728*" },
{ "macaddress": "EC2BEB*" },
{ "macaddress": "EC8AC4*" },
{ "macaddress": "ECA138*" },
{ "macaddress": "F02F9E*" },
{ "macaddress": "F0272D*" },
{ "macaddress": "F0F0A4*" },
{ "macaddress": "F4032A*" },
{ "macaddress": "F854B8*" },
{ "macaddress": "FC492D*" },
{ "macaddress": "FC65DE*" },
{ "macaddress": "FCA183*" },
{ "macaddress": "FCE9D8*" }
],
"documentation": "https://www.home-assistant.io/integrations/amazon_devices",
"integration_type": "hub",
"iot_class": "cloud_polling",
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/amazon_devices/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ rules:
discovery-update-info:
status: exempt
comment: Network information not relevant
discovery: done
discovery:
status: exempt
comment: There are a ton of mac address ranges in use, but also by kindles which are not supported by this integration
docs-data-update: todo
docs-examples: todo
docs-known-limitations: todo
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/hassio/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ class SupervisorEntityModel(StrEnum):
ADDON = "Home Assistant Add-on"
OS = "Home Assistant Operating System"
CORE = "Home Assistant Core"
SUPERVIOSR = "Home Assistant Supervisor"
SUPERVISOR = "Home Assistant Supervisor"
HOST = "Home Assistant Host"
2 changes: 1 addition & 1 deletion homeassistant/components/hassio/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def async_register_supervisor_in_dev_reg(
params = DeviceInfo(
identifiers={(DOMAIN, "supervisor")},
manufacturer="Home Assistant",
model=SupervisorEntityModel.SUPERVIOSR,
model=SupervisorEntityModel.SUPERVISOR,
sw_version=supervisor_dict[ATTR_VERSION],
name="Home Assistant Supervisor",
entry_type=dr.DeviceEntryType.SERVICE,
Expand Down
16 changes: 8 additions & 8 deletions homeassistant/components/holiday/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@ def _get_obj_holidays_and_language(
selected_categories: list[str] | None,
) -> tuple[HolidayBase, str]:
"""Get the object for the requested country and year."""
if selected_categories is None:
categories = [PUBLIC]
else:
categories = [PUBLIC, *selected_categories]

obj_holidays = country_holidays(
country,
subdiv=province,
years={dt_util.now().year, dt_util.now().year + 1},
language=language,
categories=categories,
categories=selected_categories,
)
if language == "en":
for lang in obj_holidays.supported_languages:
Expand All @@ -45,7 +40,7 @@ def _get_obj_holidays_and_language(
subdiv=province,
years={dt_util.now().year, dt_util.now().year + 1},
language=lang,
categories=categories,
categories=selected_categories,
)
language = lang
break
Expand All @@ -59,7 +54,7 @@ def _get_obj_holidays_and_language(
subdiv=province,
years={dt_util.now().year, dt_util.now().year + 1},
language=default_language,
categories=categories,
categories=selected_categories,
)
language = default_language

Expand All @@ -77,6 +72,11 @@ async def async_setup_entry(
categories: list[str] | None = config_entry.options.get(CONF_CATEGORIES)
language = hass.config.language

if categories is None:
categories = [PUBLIC]
else:
categories = [PUBLIC, *categories]

obj_holidays, language = await hass.async_add_executor_job(
_get_obj_holidays_and_language, country, province, language, categories
)
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/homeassistant/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
},
"deprecated_system_packages_config_flow_integration": {
"title": "The {integration_title} integration is being removed",
"description": "The {integration_title} integration is being removed as it requires additional system packages, which can't be installed on supported Home Assistant installations. Remove all \"{integration_title}\" config entries to fix this issue."
"description": "The {integration_title} integration is being removed as it depends on system packages that can only be installed on systems running a deprecated architecture. To resolve this, remove all \"{integration_title}\" config entries."
},
"deprecated_system_packages_yaml_integration": {
"title": "The {integration_title} integration is being removed",
"description": "The {integration_title} integration is being removed as it requires additional system packages, which can't be installed on supported Home Assistant installations. Remove the `{domain}` configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
"description": "The {integration_title} integration is being removed as it depends on system packages that can only be installed on systems running a deprecated architecture. To resolve this, remove the {domain} entry from your configuration.yaml file and restart Home Assistant."
},
"historic_currency": {
"title": "The configured currency is no longer in use",
Expand Down
32 changes: 23 additions & 9 deletions homeassistant/components/homee/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ def hvac_mode(self) -> HVACMode:
if ClimateEntityFeature.TURN_OFF in self.supported_features and (
self._heating_mode is not None
):
if self._heating_mode.current_value == 0:
if self._heating_mode.current_value == self._heating_mode.minimum:
return HVACMode.OFF

return HVACMode.HEAT

@property
def hvac_action(self) -> HVACAction:
"""Return the hvac action."""
if self._heating_mode is not None and self._heating_mode.current_value == 0:
if (
self._heating_mode is not None
and self._heating_mode.current_value == self._heating_mode.minimum
):
return HVACAction.OFF

if (
Expand All @@ -110,10 +113,12 @@ def preset_mode(self) -> str:
if (
ClimateEntityFeature.PRESET_MODE in self.supported_features
and self._heating_mode is not None
and self._heating_mode.current_value > 0
and self._heating_mode.current_value > self._heating_mode.minimum
):
assert self._attr_preset_modes is not None
return self._attr_preset_modes[int(self._heating_mode.current_value) - 1]
return self._attr_preset_modes[
int(self._heating_mode.current_value - self._heating_mode.minimum) - 1
]

return PRESET_NONE

Expand Down Expand Up @@ -147,14 +152,16 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
# Currently only HEAT and OFF are supported.
assert self._heating_mode is not None
await self.async_set_homee_value(
self._heating_mode, float(hvac_mode == HVACMode.HEAT)
self._heating_mode,
(hvac_mode == HVACMode.HEAT) + self._heating_mode.minimum,
)

async def async_set_preset_mode(self, preset_mode: str) -> None:
"""Set new target preset mode."""
assert self._heating_mode is not None and self._attr_preset_modes is not None
await self.async_set_homee_value(
self._heating_mode, self._attr_preset_modes.index(preset_mode) + 1
self._heating_mode,
self._attr_preset_modes.index(preset_mode) + self._heating_mode.minimum + 1,
)

async def async_set_temperature(self, **kwargs: Any) -> None:
Expand All @@ -168,12 +175,16 @@ async def async_set_temperature(self, **kwargs: Any) -> None:
async def async_turn_on(self) -> None:
"""Turn the entity on."""
assert self._heating_mode is not None
await self.async_set_homee_value(self._heating_mode, 1)
await self.async_set_homee_value(
self._heating_mode, 1 + self._heating_mode.minimum
)

async def async_turn_off(self) -> None:
"""Turn the entity on."""
assert self._heating_mode is not None
await self.async_set_homee_value(self._heating_mode, 0)
await self.async_set_homee_value(
self._heating_mode, 0 + self._heating_mode.minimum
)


def get_climate_features(
Expand All @@ -193,7 +204,10 @@ def get_climate_features(
if attribute.maximum > 1:
# Node supports more modes than off and heating.
features |= ClimateEntityFeature.PRESET_MODE
preset_modes.extend([PRESET_ECO, PRESET_BOOST, PRESET_MANUAL])
if attribute.maximum < 5:
preset_modes.extend([PRESET_ECO, PRESET_BOOST, PRESET_MANUAL])
else:
preset_modes.extend([PRESET_ECO])

if len(preset_modes) > 0:
preset_modes.insert(0, PRESET_NONE)
Expand Down
29 changes: 29 additions & 0 deletions homeassistant/components/homee/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ class HomeeNumberEntityDescription(NumberEntityDescription):


NUMBER_DESCRIPTIONS = {
AttributeType.BUTTON_BRIGHTNESS_ACTIVE: HomeeNumberEntityDescription(
key="button_brightness_active",
entity_category=EntityCategory.CONFIG,
),
AttributeType.BUTTON_BRIGHTNESS_DIMMED: HomeeNumberEntityDescription(
key="button_brightness_dimmed",
entity_category=EntityCategory.CONFIG,
),
AttributeType.DISPLAY_BRIGHTNESS_ACTIVE: HomeeNumberEntityDescription(
key="display_brightness_active",
entity_category=EntityCategory.CONFIG,
),
AttributeType.DISPLAY_BRIGHTNESS_DIMMED: HomeeNumberEntityDescription(
key="display_brightness_dimmed",
entity_category=EntityCategory.CONFIG,
),
AttributeType.DOWN_POSITION: HomeeNumberEntityDescription(
key="down_position",
entity_category=EntityCategory.CONFIG,
Expand All @@ -48,6 +64,14 @@ class HomeeNumberEntityDescription(NumberEntityDescription):
key="endposition_configuration",
entity_category=EntityCategory.CONFIG,
),
AttributeType.EXTERNAL_TEMPERATURE_OFFSET: HomeeNumberEntityDescription(
key="external_temperature_offset",
entity_category=EntityCategory.CONFIG,
),
AttributeType.FLOOR_TEMPERATURE_OFFSET: HomeeNumberEntityDescription(
key="floor_temperature_offset",
entity_category=EntityCategory.CONFIG,
),
AttributeType.MOTION_ALARM_CANCELATION_DELAY: HomeeNumberEntityDescription(
key="motion_alarm_cancelation_delay",
device_class=NumberDeviceClass.DURATION,
Expand Down Expand Up @@ -83,6 +107,11 @@ class HomeeNumberEntityDescription(NumberEntityDescription):
key="temperature_offset",
entity_category=EntityCategory.CONFIG,
),
AttributeType.TEMPERATURE_REPORT_INTERVAL: HomeeNumberEntityDescription(
key="temperature_report_interval",
device_class=NumberDeviceClass.DURATION,
entity_category=EntityCategory.CONFIG,
),
AttributeType.UP_TIME: HomeeNumberEntityDescription(
key="up_time",
device_class=NumberDeviceClass.DURATION,
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/homee/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
PARALLEL_UPDATES = 0

SELECT_DESCRIPTIONS: dict[AttributeType, SelectEntityDescription] = {
AttributeType.DISPLAY_TEMPERATURE_SELECTION: SelectEntityDescription(
key="display_temperature_selection",
options=["target", "current"],
entity_category=EntityCategory.CONFIG,
),
AttributeType.REPEATER_MODE: SelectEntityDescription(
key="repeater_mode",
options=["off", "level1", "level2"],
Expand Down
Loading