Matter pump setpoint CurrentLevel limit (#149689)

This commit is contained in:
Ludovic BOUÉ
2025-08-05 11:19:03 +02:00
committed by GitHub
parent 08ea640629
commit 02a3c5be14
4 changed files with 6 additions and 4 deletions

View File

@@ -285,7 +285,9 @@ DISCOVERY_SCHEMAS = [
native_min_value=0.5,
native_step=0.5,
device_to_ha=(
lambda x: None if x is None else x / 2 # Matter range (1-200)
lambda x: None
if x is None
else min(x, 200) / 2 # Matter range (1-200, capped at 200)
),
ha_to_device=lambda x: round(x * 2), # HA range 0.5100.0%
mode=NumberMode.SLIDER,

View File

@@ -203,7 +203,7 @@
"1/6/65528": [],
"1/6/65529": [0, 1, 2],
"1/6/65531": [0, 65532, 65533, 65528, 65529, 65531],
"1/8/0": 254,
"1/8/0": 200,
"1/8/15": 0,
"1/8/17": 0,
"1/8/65532": 0,

View File

@@ -2189,7 +2189,7 @@
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '127.0',
'state': '100.0',
})
# ---
# name: test_numbers[silabs_laundrywasher][number.laundrywasher_temperature_setpoint-entry]

View File

@@ -172,7 +172,7 @@ async def test_pump_level(
# CurrentLevel on LevelControl cluster
state = hass.states.get("number.mock_pump_setpoint")
assert state
assert state.state == "127.0"
assert state.state == "100.0"
set_node_attribute(matter_node, 1, 8, 0, 100)
await trigger_subscription_callback(hass, matter_client)