Skip to content

Commit a12915f

Browse files
frenckemontnemerymoosilauke18jrhillerykbickar
authored
2025.3.2 (#140392)
* Don't allow creating backups if Home Assistant is not running (#139499) * Don't allow creating backups if hass is not running * Revert "Don't allow creating backups if hass is not running" This reverts commit 1bf545e. * Set backup manager to idle only after Home Assistant has started * Update according to discussion, add tests * Add more test * Bump govee_ble to 0.43.1 (#139862) Bump govee_ble to 0.43.0 * Label emergency heat switch (#139872) * Add label to emergency heat switch * Use sentence case names Co-authored-by: Franck Nijhof <[email protected]> --------- Co-authored-by: Franck Nijhof <[email protected]> * Bump sense-energy lib to 0.13.7 (#140068) * Update jinja to 3.1.6 (#140069) * Update evohome-async to 1.0.3 (#140083) bump client to 1.0.3 * Fix HEOS discovery error when previously ignored (#140091) Abort ignored discovery * Map prewash job state in SmartThings (#140097) * Check support for thermostat operating state in SmartThings (#140103) * Handle None options in SmartThings (#140110) * Handle None options in SmartThings * Handle None options in SmartThings * Fix MQTT JSON light not reporting color temp status if color is not supported (#140113) * Fix HEOS user initiated setup when discovery is waiting confirmation (#140119) * Support null supported Thermostat modes in SmartThings (#140101) * Set device class for Oven Completion time in SmartThings (#140139) * Revert "Check if the unit of measurement is valid before creating the entity" (#140155) Revert "Check if the unit of measurement is valid before creating the entity …" This reverts commit 99e1a7a. * Fix the order of the group members attribute of the Music Assistant integration (#140204) * Fix events without user in Bring integration (#140213) Fix events without publicUserUuid * Log broad exception in Electricity Maps config flow (#140219) * Bump evohome-async to 1.0.4 to fix #140194 (#140230) bump client, add test for fix #140194 * Refresh Home Connect token during config entry setup (#140233) * Refresh token during config entry setup * Test 500 error --------- Co-authored-by: Martin Hjelmare <[email protected]> * Add 900 RPM option to washer spin speed options at Home Connect (#140234) Add 900 RPM option to washer spin speed options * Fix todo tool broken with Gemini 2.0 models. (#140246) * Change tool name for addlist item * Change to HasListAddItem * extract to function * Fix version not always available in onewire (#140260) * Fix `client_id` not generated when connecting to the MQTT broker (#140264) Fix client_id not generated when connecting to the MQTT broker * Bump velbusaio to 2025.3.0 (#140267) * Fix dryer operating state in SmartThings (#140277) * FGLair : Upgrade to ayla-iot-unofficial 1.4.7 (#140296) Upgrade to ayla-iot-unofficial 1.4.7 * Bump pyheos to v1.0.3 (#140310) Bump pyheos v1.0.3 * Bump ZHA to 0.0.52 (#140325) * Bump pydrawise to 2025.3.0 (#140330) * Bump teslemetry-stream (#140335) Bump * Fix no temperature unit in SmartThings (#140363) * Fix double space quoting in WebDAV (#140364) * Bump python-roborock to 2.12.2 (#140368) bump python roboorck to 2.12.2 * Handle incomplete power consumption reports in SmartThings (#140370) * Fix browsing Audible Favorites in Sonos (#140378) * initial commit * updates * update test data * Make sure SmartThings light can deal with unknown states (#140190) * Fix * add comment * Make light unknown * Make light unknown * Delete subscription on shutdown of SmartThings (#140135) * Cache subscription url in SmartThings * Cache subscription url in SmartThings * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Bump pysmartthings to 2.7.1 * 2.7.2 --------- Co-authored-by: Martin Hjelmare <[email protected]> * Bump version to 2025.3.2 --------- Co-authored-by: Erik Montnemery <[email protected]> Co-authored-by: Evan Farrell <[email protected]> Co-authored-by: John Hillery <[email protected]> Co-authored-by: Keilin Bickar <[email protected]> Co-authored-by: David Bonnes <[email protected]> Co-authored-by: Andrew Sayre <[email protected]> Co-authored-by: Joost Lekkerkerker <[email protected]> Co-authored-by: Jan Bouwhuis <[email protected]> Co-authored-by: msm595 <[email protected]> Co-authored-by: Manu <[email protected]> Co-authored-by: Jan-Philipp Benecke <[email protected]> Co-authored-by: J. Diego Rodríguez Royo <[email protected]> Co-authored-by: Martin Hjelmare <[email protected]> Co-authored-by: Luke Lashley <[email protected]> Co-authored-by: epenet <[email protected]> Co-authored-by: Maikel Punie <[email protected]> Co-authored-by: Antoine Reversat <[email protected]> Co-authored-by: puddly <[email protected]> Co-authored-by: David Knowles <[email protected]> Co-authored-by: Brett Adams <[email protected]> Co-authored-by: Pete Sage <[email protected]>
2 parents 4e89948 + 3d5e4b9 commit a12915f

File tree

86 files changed

+5138
-506
lines changed

Some content is hidden

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

86 files changed

+5138
-506
lines changed

homeassistant/components/backup/manager.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ class BackupManagerState(StrEnum):
118118

119119
IDLE = "idle"
120120
CREATE_BACKUP = "create_backup"
121+
BLOCKED = "blocked"
121122
RECEIVE_BACKUP = "receive_backup"
122123
RESTORE_BACKUP = "restore_backup"
123124

@@ -226,6 +227,13 @@ class RestoreBackupEvent(ManagerStateEvent):
226227
state: RestoreBackupState
227228

228229

230+
@dataclass(frozen=True, kw_only=True, slots=True)
231+
class BlockedEvent(ManagerStateEvent):
232+
"""Backup manager blocked, Home Assistant is starting."""
233+
234+
manager_state: BackupManagerState = BackupManagerState.BLOCKED
235+
236+
229237
class BackupPlatformProtocol(Protocol):
230238
"""Define the format that backup platforms can have."""
231239

@@ -340,7 +348,7 @@ def __init__(self, hass: HomeAssistant, reader_writer: BackupReaderWriter) -> No
340348
self.remove_next_delete_event: Callable[[], None] | None = None
341349

342350
# Latest backup event and backup event subscribers
343-
self.last_event: ManagerStateEvent = IdleEvent()
351+
self.last_event: ManagerStateEvent = BlockedEvent()
344352
self.last_non_idle_event: ManagerStateEvent | None = None
345353
self._backup_event_subscriptions = hass.data[
346354
DATA_BACKUP
@@ -354,10 +362,19 @@ async def async_setup(self) -> None:
354362
self.known_backups.load(stored["backups"])
355363

356364
await self._reader_writer.async_validate_config(config=self.config)
365+
357366
await self._reader_writer.async_resume_restore_progress_after_restart(
358367
on_progress=self.async_on_backup_event
359368
)
360369

370+
async def set_manager_idle_after_start(hass: HomeAssistant) -> None:
371+
"""Set manager to idle after start."""
372+
self.async_on_backup_event(IdleEvent())
373+
374+
if self.state == BackupManagerState.BLOCKED:
375+
# If we're not finishing a restore job, set the manager to idle after start
376+
start.async_at_started(self.hass, set_manager_idle_after_start)
377+
361378
await self.load_platforms()
362379

363380
@property
@@ -1293,7 +1310,7 @@ def async_on_backup_event(
12931310
if (current_state := self.state) != (new_state := event.manager_state):
12941311
LOGGER.debug("Backup state: %s -> %s", current_state, new_state)
12951312
self.last_event = event
1296-
if not isinstance(event, IdleEvent):
1313+
if not isinstance(event, (BlockedEvent, IdleEvent)):
12971314
self.last_non_idle_event = event
12981315
for subscription in self._backup_event_subscriptions:
12991316
subscription(event)

homeassistant/components/bring/event.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ def _async_handle_event(self) -> None:
7777
attributes = asdict(activity.content)
7878

7979
attributes["last_activity_by"] = next(
80-
x.name
81-
for x in bring_list.users.users
82-
if x.publicUuid == activity.content.publicUserUuid
80+
(
81+
x.name
82+
for x in bring_list.users.users
83+
if x.publicUuid == activity.content.publicUserUuid
84+
),
85+
None,
8386
)
8487

8588
self._trigger_event(

homeassistant/components/co2signal/config_flow.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
from __future__ import annotations
44

55
from collections.abc import Mapping
6+
import logging
67
from typing import Any
78

89
from aioelectricitymaps import (
910
ElectricityMaps,
10-
ElectricityMapsError,
1111
ElectricityMapsInvalidTokenError,
1212
ElectricityMapsNoDataError,
1313
)
@@ -36,6 +36,8 @@
3636
TYPE_SPECIFY_COORDINATES = "specify_coordinates"
3737
TYPE_SPECIFY_COUNTRY = "specify_country_code"
3838

39+
_LOGGER = logging.getLogger(__name__)
40+
3941

4042
class ElectricityMapsConfigFlow(ConfigFlow, domain=DOMAIN):
4143
"""Handle a config flow for Co2signal."""
@@ -158,7 +160,8 @@ async def _validate_and_create(
158160
errors["base"] = "invalid_auth"
159161
except ElectricityMapsNoDataError:
160162
errors["base"] = "no_data"
161-
except ElectricityMapsError:
163+
except Exception:
164+
_LOGGER.exception("Unexpected error occurred while checking API key")
162165
errors["base"] = "unknown"
163166
else:
164167
if self.source == SOURCE_REAUTH:

homeassistant/components/emulated_kasa/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"iot_class": "local_push",
77
"loggers": ["sense_energy"],
88
"quality_scale": "internal",
9-
"requirements": ["sense-energy==0.13.6"]
9+
"requirements": ["sense-energy==0.13.7"]
1010
}

homeassistant/components/evohome/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"iot_class": "cloud_polling",
77
"loggers": ["evohome", "evohomeasync", "evohomeasync2"],
88
"quality_scale": "legacy",
9-
"requirements": ["evohome-async==1.0.2"]
9+
"requirements": ["evohome-async==1.0.4"]
1010
}

homeassistant/components/fujitsu_fglair/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"config_flow": true,
66
"documentation": "https://www.home-assistant.io/integrations/fujitsu_fglair",
77
"iot_class": "cloud_polling",
8-
"requirements": ["ayla-iot-unofficial==1.4.5"]
8+
"requirements": ["ayla-iot-unofficial==1.4.7"]
99
}

homeassistant/components/google_generative_ai_conversation/conversation.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ async def async_process(
276276
):
277277
return await self._async_handle_message(user_input, chat_log)
278278

279+
def _fix_tool_name(self, tool_name: str) -> str:
280+
"""Fix tool name if needed."""
281+
# The Gemini 2.0+ tokenizer seemingly has a issue with the HassListAddItem tool
282+
# name. This makes sure when it incorrectly changes the name, that we change it
283+
# back for HA to call.
284+
return tool_name if tool_name != "HasListAddItem" else "HassListAddItem"
285+
279286
async def _async_handle_message(
280287
self,
281288
user_input: conversation.ConversationInput,
@@ -435,7 +442,10 @@ async def _async_handle_message(
435442
tool_name = tool_call.name
436443
tool_args = _escape_decode(tool_call.args)
437444
tool_calls.append(
438-
llm.ToolInput(tool_name=tool_name, tool_args=tool_args)
445+
llm.ToolInput(
446+
tool_name=self._fix_tool_name(tool_name),
447+
tool_args=tool_args,
448+
)
439449
)
440450

441451
chat_request = _create_google_tool_response_content(

homeassistant/components/govee_ble/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,5 @@
135135
"dependencies": ["bluetooth_adapters"],
136136
"documentation": "https://www.home-assistant.io/integrations/govee_ble",
137137
"iot_class": "local_push",
138-
"requirements": ["govee-ble==0.43.0"]
138+
"requirements": ["govee-ble==0.43.1"]
139139
}

homeassistant/components/heos/config_flow.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
)
1515
import voluptuous as vol
1616

17-
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow
17+
from homeassistant.config_entries import (
18+
SOURCE_IGNORE,
19+
ConfigFlow,
20+
ConfigFlowResult,
21+
OptionsFlow,
22+
)
1823
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
1924
from homeassistant.core import callback
2025
from homeassistant.helpers import selector
@@ -141,8 +146,10 @@ async def async_step_ssdp(
141146
hostname = urlparse(discovery_info.ssdp_location).hostname
142147
assert hostname is not None
143148

144-
# Abort early when discovered host is part of the current system
145-
if entry and hostname in _get_current_hosts(entry):
149+
# Abort early when discovery is ignored or host is part of the current system
150+
if entry and (
151+
entry.source == SOURCE_IGNORE or hostname in _get_current_hosts(entry)
152+
):
146153
return self.async_abort(reason="single_instance_allowed")
147154

148155
# Connect to discovered host and get system information
@@ -198,7 +205,7 @@ async def async_step_user(
198205
self, user_input: dict[str, Any] | None = None
199206
) -> ConfigFlowResult:
200207
"""Obtain host and validate connection."""
201-
await self.async_set_unique_id(DOMAIN)
208+
await self.async_set_unique_id(DOMAIN, raise_on_progress=False)
202209
self._abort_if_unique_id_configured(error="single_instance_allowed")
203210
# Try connecting to host if provided
204211
errors: dict[str, str] = {}

homeassistant/components/heos/coordinator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,12 @@ async def _async_on_disconnected(self) -> None:
159159

160160
async def _async_on_reconnected(self) -> None:
161161
"""Handle when reconnected so resources are updated and entities marked available."""
162-
await self._async_update_players()
163162
await self._async_update_sources()
164163
_LOGGER.warning("Successfully reconnected to HEOS host %s", self.host)
165164
self.async_update_listeners()
166165

167166
async def _async_on_controller_event(
168-
self, event: str, data: PlayerUpdateResult | None
167+
self, event: str, data: PlayerUpdateResult | None = None
169168
) -> None:
170169
"""Handle a controller event, such as players or groups changed."""
171170
if event == const.EVENT_PLAYERS_CHANGED:

0 commit comments

Comments
 (0)