Skip to content

Commit 6145ea2

Browse files
frenckedenhausbdracomattdorangjohansson-ST
authored
Co-authored-by: Robert Resch <robert@resch.dev> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Matt Doran <mattdoran76@gmail.com> Co-authored-by: G Johansson <goran.johansson@shiftit.se> Co-authored-by: Makrit <sinticlee@gmail.com> Co-authored-by: Claudio Ruggeri - CR-Tech <41435902+crug80@users.noreply.github.com> Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> Co-authored-by: Yuxin Wang <yuxinwang.dev@gmail.com> Co-authored-by: Åke Strandberg <ake@strandberg.eu> Co-authored-by: Paul Bottein <paul.bottein@gmail.com> Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Klaas Schoute <klaas_schoute@hotmail.com> Fix slave id equal to 0 (home-assistant#136263)
2 parents 3e1d13b + 223b437 commit 6145ea2

29 files changed

Lines changed: 114 additions & 45 deletions

homeassistant/components/apcupsd/coordinator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def model(self) -> str | None:
4444
@property
4545
def serial_no(self) -> str | None:
4646
"""Return the unique serial number of the UPS, if available."""
47-
return self.get("SERIALNO")
47+
sn = self.get("SERIALNO")
48+
# We had user reports that some UPS models simply return "Blank" as serial number, in
49+
# which case we fall back to `None` to indicate that it is actually not available.
50+
return None if sn == "Blank" else sn
4851

4952

5053
class APCUPSdCoordinator(DataUpdateCoordinator[APCUPSdData]):

homeassistant/components/frontend/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
"documentation": "https://www.home-assistant.io/integrations/frontend",
2222
"integration_type": "system",
2323
"quality_scale": "internal",
24-
"requirements": ["home-assistant-frontend==20250109.0"]
24+
"requirements": ["home-assistant-frontend==20250109.2"]
2525
}

homeassistant/components/holiday/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/holiday",
77
"iot_class": "local_polling",
8-
"requirements": ["holidays==0.64", "babel==2.15.0"]
8+
"requirements": ["holidays==0.65", "babel==2.15.0"]
99
}

homeassistant/components/hydrawise/binary_sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class HydrawiseBinarySensorEntityDescription(BinarySensorEntityDescription):
6868
)
6969

7070
SCHEMA_START_WATERING: VolDictType = {
71-
vol.Optional("duration"): vol.All(vol.Coerce(int), vol.Range(min=0, max=90)),
71+
vol.Optional("duration"): vol.All(vol.Coerce(int), vol.Range(min=0, max=1440)),
7272
}
7373
SCHEMA_SUSPEND: VolDictType = {
7474
vol.Required("until"): cv.datetime,

homeassistant/components/hydrawise/services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ start_watering:
1010
selector:
1111
number:
1212
min: 0
13-
max: 90
13+
max: 1440
1414
unit_of_measurement: min
1515
mode: box
1616
suspend:

homeassistant/components/linkplay/entity.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,15 @@ def __init__(self, bridge: LinkPlayBridge) -> None:
4444
if model != MANUFACTURER_GENERIC:
4545
model_id = bridge.device.properties["project"]
4646

47+
connections: set[tuple[str, str]] = set()
48+
if "MAC" in bridge.device.properties:
49+
connections.add(
50+
(dr.CONNECTION_NETWORK_MAC, bridge.device.properties["MAC"])
51+
)
52+
4753
self._attr_device_info = dr.DeviceInfo(
4854
configuration_url=bridge.endpoint,
49-
connections={(dr.CONNECTION_NETWORK_MAC, bridge.device.properties["MAC"])},
55+
connections=connections,
5056
hw_version=bridge.device.properties["hardware"],
5157
identifiers={(DOMAIN, bridge.device.uuid)},
5258
manufacturer=manufacturer,

homeassistant/components/modbus/entity.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ def __init__(
7979
"""Initialize the Modbus binary sensor."""
8080

8181
self._hub = hub
82-
self._slave = entry.get(CONF_SLAVE) or entry.get(CONF_DEVICE_ADDRESS, 0)
82+
if (conf_slave := entry.get(CONF_SLAVE)) is not None:
83+
self._slave = conf_slave
84+
else:
85+
self._slave = entry.get(CONF_DEVICE_ADDRESS, 1)
8386
self._address = int(entry[CONF_ADDRESS])
8487
self._input_type = entry[CONF_INPUT_TYPE]
8588
self._value: str | None = None

homeassistant/components/modbus/modbus.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ async def low_level_pb_call(
368368
self, slave: int | None, address: int, value: int | list[int], use_call: str
369369
) -> ModbusPDU | None:
370370
"""Call sync. pymodbus."""
371-
kwargs = {"slave": slave} if slave else {}
371+
kwargs: dict[str, Any] = (
372+
{ATTR_SLAVE: slave} if slave is not None else {ATTR_SLAVE: 1}
373+
)
372374
entry = self._pb_request[use_call]
373375
try:
374376
result: ModbusPDU = await entry.func(address, value, **kwargs)

homeassistant/components/myuplink/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ def __init__(
325325
}
326326

327327
@property
328-
def native_value(self) -> str:
328+
def native_value(self) -> str | None:
329329
"""Sensor state value for enum sensor."""
330330
device_point = self.coordinator.data.points[self.device_id][self.point_id]
331-
return self.options_map[str(int(device_point.value))] # type: ignore[no-any-return]
331+
return self.options_map.get(str(int(device_point.value)))
332332

333333

334334
class MyUplinkEnumRawSensor(MyUplinkDevicePointSensor):

homeassistant/components/peblar/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
ChargeLimiter.INSTALLATION_LIMIT: "installation_limit",
2424
ChargeLimiter.LOCAL_MODBUS_API: "local_modbus_api",
2525
ChargeLimiter.LOCAL_REST_API: "local_rest_api",
26-
ChargeLimiter.LOCAL_SCHEDULED: "local_scheduled",
26+
ChargeLimiter.LOCAL_SCHEDULED_CHARGING: "local_scheduled_charging",
2727
ChargeLimiter.OCPP_SMART_CHARGING: "ocpp_smart_charging",
2828
ChargeLimiter.OVERCURRENT_PROTECTION: "overcurrent_protection",
2929
ChargeLimiter.PHASE_IMBALANCE: "phase_imbalance",

0 commit comments

Comments
 (0)