Skip to content

Commit 4d1c89f

Browse files
authored
2025.3.3 (#140583)
2 parents a12915f + 831f2dc commit 4d1c89f

File tree

34 files changed

+1724
-93
lines changed

34 files changed

+1724
-93
lines changed

homeassistant/components/bluesound/config_flow.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ async def async_step_zeroconf(
7575
self, discovery_info: ZeroconfServiceInfo
7676
) -> ConfigFlowResult:
7777
"""Handle a flow initialized by zeroconf discovery."""
78+
# the player can have an ipv6 address, but the api is only available on ipv4
79+
if discovery_info.ip_address.version != 4:
80+
return self.async_abort(reason="no_ipv4_address")
7881
if discovery_info.port is not None:
7982
self._port = discovery_info.port
8083

homeassistant/components/bluesound/strings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"abort": {
2020
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]",
2121
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
22-
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]"
22+
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
23+
"no_ipv4_address": "No IPv4 address found."
2324
},
2425
"error": {
2526
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"

homeassistant/components/knx/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"loggers": ["xknx", "xknxproject"],
1212
"requirements": [
1313
"xknx==3.6.0",
14-
"xknxproject==3.8.1",
14+
"xknxproject==3.8.2",
1515
"knx-frontend==2025.1.30.194235"
1616
],
1717
"single_config_entry": true

homeassistant/components/number/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ class NumberDeviceClass(StrEnum):
486486
NumberDeviceClass.PM25: {CONCENTRATION_MICROGRAMS_PER_CUBIC_METER},
487487
NumberDeviceClass.POWER_FACTOR: {PERCENTAGE, None},
488488
NumberDeviceClass.POWER: {
489+
UnitOfPower.MILLIWATT,
489490
UnitOfPower.WATT,
490491
UnitOfPower.KILO_WATT,
491492
UnitOfPower.MEGA_WATT,

homeassistant/components/number/services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ set_value:
77
fields:
88
value:
99
example: 42
10+
required: true
1011
selector:
1112
text:

homeassistant/components/roborock/image.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,6 @@ def is_selected(self) -> bool:
112112
"""Return if this map is the currently selected map."""
113113
return self.map_flag == self.coordinator.current_map
114114

115-
def is_map_valid(self) -> bool:
116-
"""Update the map if it is valid.
117-
118-
Update this map if it is the currently active map, and the
119-
vacuum is cleaning, or if it has never been set at all.
120-
"""
121-
return self.cached_map == b"" or (
122-
self.is_selected
123-
and self.image_last_updated is not None
124-
and self.coordinator.roborock_device_info.props.status is not None
125-
and bool(self.coordinator.roborock_device_info.props.status.in_cleaning)
126-
)
127-
128115
async def async_added_to_hass(self) -> None:
129116
"""When entity is added to hass load any previously cached maps from disk."""
130117
await super().async_added_to_hass()
@@ -137,15 +124,22 @@ def _handle_coordinator_update(self) -> None:
137124
# Bump last updated every third time the coordinator runs, so that async_image
138125
# will be called and we will evaluate on the new coordinator data if we should
139126
# update the cache.
140-
if (
141-
dt_util.utcnow() - self.image_last_updated
142-
).total_seconds() > IMAGE_CACHE_INTERVAL and self.is_map_valid():
127+
if self.is_selected and (
128+
(
129+
(dt_util.utcnow() - self.image_last_updated).total_seconds()
130+
> IMAGE_CACHE_INTERVAL
131+
and self.coordinator.roborock_device_info.props.status is not None
132+
and bool(self.coordinator.roborock_device_info.props.status.in_cleaning)
133+
)
134+
or self.cached_map == b""
135+
):
136+
# This will tell async_image it should update.
143137
self._attr_image_last_updated = dt_util.utcnow()
144138
super()._handle_coordinator_update()
145139

146140
async def async_image(self) -> bytes | None:
147141
"""Update the image if it is not cached."""
148-
if self.is_map_valid():
142+
if self.is_selected:
149143
response = await asyncio.gather(
150144
*(
151145
self.cloud_api.get_map_v1(),

homeassistant/components/sensor/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ class SensorStateClass(StrEnum):
582582
SensorDeviceClass.PM25: {CONCENTRATION_MICROGRAMS_PER_CUBIC_METER},
583583
SensorDeviceClass.POWER_FACTOR: {PERCENTAGE, None},
584584
SensorDeviceClass.POWER: {
585+
UnitOfPower.MILLIWATT,
585586
UnitOfPower.WATT,
586587
UnitOfPower.KILO_WATT,
587588
UnitOfPower.MEGA_WATT,

homeassistant/components/shelly/diagnostics.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ async def async_get_config_entry_diagnostics(
7474
device_settings = {
7575
k: v for k, v in rpc_coordinator.device.config.items() if k in ["cloud"]
7676
}
77-
ws_config = rpc_coordinator.device.config["ws"]
78-
device_settings["ws_outbound_enabled"] = ws_config["enable"]
79-
if ws_config["enable"]:
80-
device_settings["ws_outbound_server_valid"] = bool(
81-
ws_config["server"] == get_rpc_ws_url(hass)
82-
)
77+
if not (ws_config := rpc_coordinator.device.config.get("ws", {})):
78+
device_settings["ws_outbound"] = "not supported"
79+
if (ws_outbound_enabled := ws_config.get("enable")) is not None:
80+
device_settings["ws_outbound_enabled"] = ws_outbound_enabled
81+
if ws_outbound_enabled:
82+
device_settings["ws_outbound_server_valid"] = bool(
83+
ws_config["server"] == get_rpc_ws_url(hass)
84+
)
8385
device_status = {
8486
k: v
8587
for k, v in rpc_coordinator.device.status.items()

homeassistant/components/smartthings/cover.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def _update_attr(self) -> None:
118118
self._attr_current_cover_position = self.get_attribute_value(
119119
Capability.SWITCH_LEVEL, Attribute.LEVEL
120120
)
121+
elif self.supports_capability(Capability.WINDOW_SHADE_LEVEL):
122+
self._attr_current_cover_position = self.get_attribute_value(
123+
Capability.WINDOW_SHADE_LEVEL, Attribute.SHADE_LEVEL
124+
)
121125

122126
self._attr_extra_state_attributes = {}
123127
if self.supports_capability(Capability.BATTERY):

homeassistant/components/smartthings/sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ class SmartThingsSensorEntityDescription(SensorEntityDescription):
572572
SmartThingsSensorEntityDescription(
573573
key=Attribute.OVEN_SETPOINT,
574574
translation_key="oven_setpoint",
575+
device_class=SensorDeviceClass.TEMPERATURE,
576+
native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
577+
value_fn=lambda value: value if value != 0 else None,
575578
)
576579
]
577580
},

0 commit comments

Comments
 (0)