Skip to content

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

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 10 commits into from
Jun 3, 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
2 changes: 2 additions & 0 deletions homeassistant/components/atag/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
STATE_ECO,
STATE_PERFORMANCE,
WaterHeaterEntity,
WaterHeaterEntityFeature,
)
from homeassistant.const import ATTR_TEMPERATURE, STATE_OFF, Platform, UnitOfTemperature
from homeassistant.core import HomeAssistant
Expand All @@ -32,6 +33,7 @@ class AtagWaterHeater(AtagEntity, WaterHeaterEntity):
"""Representation of an ATAG water heater."""

_attr_operation_list = OPERATION_LIST
_attr_supported_features = WaterHeaterEntityFeature.TARGET_TEMPERATURE
_attr_temperature_unit = UnitOfTemperature.CELSIUS

@property
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/bluetooth/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"bluetooth-auto-recovery==1.5.2",
"bluetooth-data-tools==1.28.1",
"dbus-fast==2.43.0",
"habluetooth==3.48.2"
"habluetooth==3.49.0"
]
}
2 changes: 1 addition & 1 deletion homeassistant/components/eq3btsmart/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"integration_type": "device",
"iot_class": "local_polling",
"loggers": ["eq3btsmart"],
"requirements": ["eq3btsmart==1.4.1", "bleak-esphome==2.15.1"]
"requirements": ["eq3btsmart==1.4.1", "bleak-esphome==2.16.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"requirements": [
"aioesphomeapi==31.1.0",
"esphome-dashboard-api==1.3.0",
"bleak-esphome==2.15.1"
"bleak-esphome==2.16.0"
],
"zeroconf": ["_esphomelib._tcp.local."]
}
8 changes: 5 additions & 3 deletions homeassistant/components/evohome/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ class EvoDHW(EvoChild, WaterHeaterEntity):
_attr_name = "DHW controller"
_attr_icon = "mdi:thermometer-lines"
_attr_operation_list = list(HA_STATE_TO_EVO)
_attr_supported_features = (
WaterHeaterEntityFeature.AWAY_MODE
| WaterHeaterEntityFeature.ON_OFF
| WaterHeaterEntityFeature.OPERATION_MODE
)
_attr_temperature_unit = UnitOfTemperature.CELSIUS

_evo_device: evo.HotWater
Expand All @@ -91,9 +96,6 @@ def __init__(
self._attr_precision = (
PRECISION_TENTHS if coordinator.client_v1 else PRECISION_WHOLE
)
self._attr_supported_features = (
WaterHeaterEntityFeature.AWAY_MODE | WaterHeaterEntityFeature.OPERATION_MODE
)

@property
def current_operation(self) -> str | None:
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/hive/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ async def async_setup_entry(
class HiveWaterHeater(HiveEntity, WaterHeaterEntity):
"""Hive Water Heater Device."""

_attr_supported_features = WaterHeaterEntityFeature.OPERATION_MODE
_attr_supported_features = (
WaterHeaterEntityFeature.ON_OFF | WaterHeaterEntityFeature.OPERATION_MODE
)
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_operation_list = SUPPORT_WATER_HEATER

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/knx/quality_scale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ rules:
status: exempt
comment: |
Since all entities are configured manually, names are user-defined.
exception-translations: todo
exception-translations: done
icon-translations: done
reconfiguration-flow: todo
repair-issues: todo
Expand Down
18 changes: 14 additions & 4 deletions homeassistant/components/knx/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def get_knx_module(hass: HomeAssistant) -> KNXModule:
try:
return hass.data[KNX_MODULE_KEY]
except KeyError as err:
raise HomeAssistantError("KNX entry not loaded") from err
raise HomeAssistantError(
translation_domain=DOMAIN, translation_key="integration_not_loaded"
) from err


SERVICE_KNX_EVENT_REGISTER_SCHEMA = vol.Schema(
Expand Down Expand Up @@ -166,7 +168,11 @@ async def service_exposure_register_modify(call: ServiceCall) -> None:
removed_exposure = knx_module.service_exposures.pop(group_address)
except KeyError as err:
raise ServiceValidationError(
f"Could not find exposure for '{group_address}' to remove."
translation_domain=DOMAIN,
translation_key="service_exposure_remove_not_found",
translation_placeholders={
"group_address": group_address,
},
) from err

removed_exposure.async_remove()
Expand Down Expand Up @@ -234,13 +240,17 @@ async def service_send_to_knx_bus(call: ServiceCall) -> None:
transcoder = DPTBase.parse_transcoder(attr_type)
if transcoder is None:
raise ServiceValidationError(
f"Invalid type for knx.send service: {attr_type}"
translation_domain=DOMAIN,
translation_key="service_send_invalid_type",
translation_placeholders={"type": attr_type},
)
try:
payload = transcoder.to_knx(attr_payload)
except ConversionError as err:
raise ServiceValidationError(
f"Invalid payload for knx.send service: {err}"
translation_domain=DOMAIN,
translation_key="service_send_invalid_payload",
translation_placeholders={"error": str(err)},
) from err
elif isinstance(attr_payload, int):
payload = DPTBinary(attr_payload)
Expand Down
14 changes: 14 additions & 0 deletions homeassistant/components/knx/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@
"unsupported_tunnel_type": "Selected tunneling type not supported by gateway."
}
},
"exceptions": {
"integration_not_loaded": {
"message": "KNX integration is not loaded."
},
"service_exposure_remove_not_found": {
"message": "Could not find exposure for `{group_address}` to remove."
},
"service_send_invalid_payload": {
"message": "Invalid payload for `knx.send` service. {error}"
},
"service_send_invalid_type": {
"message": "Invalid type for `knx.send` service: {type}"
}
},
"options": {
"step": {
"init": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/nextbus/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/nextbus",
"iot_class": "cloud_polling",
"loggers": ["py_nextbus"],
"requirements": ["py-nextbusnext==2.1.2"]
"requirements": ["py-nextbusnext==2.2.0"]
}
21 changes: 14 additions & 7 deletions homeassistant/components/samsungtv/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,14 +636,21 @@ async def _async_get_remote_under_lock(self) -> SamsungTVWSAsyncRemote | None:
)
self._remote = None
except ConnectionFailure as err:
LOGGER.warning(
(
error_details = err.args[0]
if "ms.channel.timeOut" in (error_details := repr(err)):
# The websocket was connected, but the TV is probably asleep
LOGGER.debug(
"Channel timeout occurred trying to get remote for %s: %s",
self.host,
error_details,
)
else:
LOGGER.warning(
"Unexpected ConnectionFailure trying to get remote for %s, "
"please report this issue: %s"
),
self.host,
repr(err),
)
"please report this issue: %s",
self.host,
error_details,
)
self._remote = None
except (WebSocketException, AsyncioTimeoutError, OSError) as err:
LOGGER.debug("Failed to get remote for %s: %s", self.host, repr(err))
Expand Down
9 changes: 7 additions & 2 deletions homeassistant/components/samsungtv/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
)

self.bridge = bridge
self.is_on: bool | None = False
self.is_on: bool | None = None
self.async_extra_update: Callable[[], Coroutine[Any, Any, None]] | None = None

async def _async_update_data(self) -> None:
Expand All @@ -52,7 +52,12 @@ async def _async_update_data(self) -> None:
else:
self.is_on = await self.bridge.async_is_on()
if self.is_on != old_state:
LOGGER.debug("TV %s state updated to %s", self.bridge.host, self.is_on)
LOGGER.debug(
"TV %s state updated from %s to %s",
self.bridge.host,
old_state,
self.is_on,
)

if self.async_extra_update:
await self.async_extra_update()
1 change: 1 addition & 0 deletions homeassistant/components/sma/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,6 @@ async def async_step_discovery_confirm(
vol.Required(CONF_PASSWORD): cv.string,
}
),
description_placeholders={CONF_HOST: self._data[CONF_HOST]},
errors=errors,
)
10 changes: 10 additions & 0 deletions homeassistant/components/sma/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
},
"description": "Enter your SMA device information.",
"title": "Set up SMA Solar"
},
"discovery_confirm": {
"title": "[%key:component::sma::config::step::user::title]",
"description": "Do you want to setup the discovered SMA ({host})?",
"data": {
"group": "[%key:component::sma::config::step::user::data::group]",
"password": "[%key:common::config_flow::data::password%]",
"ssl": "[%key:common::config_flow::data::ssl%]",
"verify_ssl": "[%key:common::config_flow::data::verify_ssl%]"
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion homeassistant/components/switchbot/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ async def async_step_init(
),
): int
}
if self.config_entry.data.get(CONF_SENSOR_TYPE) == SupportedModels.LOCK_PRO:
if self.config_entry.data.get(CONF_SENSOR_TYPE, "").startswith(
SupportedModels.LOCK
):
options.update(
{
vol.Optional(
Expand Down
11 changes: 9 additions & 2 deletions homeassistant/components/water_heater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,22 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
SERVICE_TURN_OFF, None, "async_turn_off", [WaterHeaterEntityFeature.ON_OFF]
)
component.async_register_entity_service(
SERVICE_SET_AWAY_MODE, SET_AWAY_MODE_SCHEMA, async_service_away_mode
SERVICE_SET_AWAY_MODE,
SET_AWAY_MODE_SCHEMA,
async_service_away_mode,
[WaterHeaterEntityFeature.AWAY_MODE],
)
component.async_register_entity_service(
SERVICE_SET_TEMPERATURE, SET_TEMPERATURE_SCHEMA, async_service_temperature_set
SERVICE_SET_TEMPERATURE,
SET_TEMPERATURE_SCHEMA,
async_service_temperature_set,
[WaterHeaterEntityFeature.TARGET_TEMPERATURE],
)
component.async_register_entity_service(
SERVICE_SET_OPERATION_MODE,
SET_OPERATION_MODE_SCHEMA,
"async_handle_set_operation_mode",
[WaterHeaterEntityFeature.OPERATION_MODE],
)

return True
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dbus-fast==2.43.0
fnv-hash-fast==1.5.0
go2rtc-client==0.2.1
ha-ffmpeg==3.2.2
habluetooth==3.48.2
habluetooth==3.49.0
hass-nabucasa==0.101.0
hassil==2.2.3
home-assistant-bluetooth==1.13.1
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.

1 change: 1 addition & 0 deletions tests/components/bluetooth/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ def inject_advertisement(
"source": "esp32",
"start_time": ANY,
"time_since_last_device_detection": {"44:44:33:11:23:45": ANY},
"raw_advertisement_data": {"44:44:33:11:23:45": None},
"type": "FakeScanner",
},
],
Expand Down
1 change: 1 addition & 0 deletions tests/components/esphome/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ async def test_diagnostics_with_bluetooth(
"scanning": True,
"source": "AA:BB:CC:DD:EE:FC",
"start_time": ANY,
"raw_advertisement_data": {},
"time_since_last_device_detection": {},
"type": "ESPHomeScanner",
},
Expand Down
4 changes: 2 additions & 2 deletions tests/components/evohome/snapshots/test_water_heater.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
'temperature': 23.0,
}),
}),
'supported_features': <WaterHeaterEntityFeature: 6>,
'supported_features': <WaterHeaterEntityFeature: 14>,
'target_temp_high': None,
'target_temp_low': None,
'temperature': None,
Expand Down Expand Up @@ -100,7 +100,7 @@
'temperature': 23.0,
}),
}),
'supported_features': <WaterHeaterEntityFeature: 6>,
'supported_features': <WaterHeaterEntityFeature: 14>,
'target_temp_high': None,
'target_temp_low': None,
'temperature': None,
Expand Down
Loading