Allow Matter thermostats with null LocalTemperature (#162973)

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
This commit is contained in:
Raman Varabets
2026-03-30 04:41:11 +02:00
committed by GitHub
co-authored by TheJulianJES
parent afc73fdcfd
commit 8978d197ca
2 changed files with 14 additions and 0 deletions
@@ -597,5 +597,6 @@ DISCOVERY_SCHEMAS = [
),
device_type=(device_types.Thermostat, device_types.RoomAirConditioner),
allow_multi=True, # also used for sensor entity
allow_none_value=True,
),
]
+13
View File
@@ -743,3 +743,16 @@ async def test_preset_mode_with_unnamed_preset(
state = hass.states.get(entity_id)
assert state
assert state.attributes["preset_mode"] == PRESET_NONE
@pytest.mark.parametrize("node_fixture", ["longan_link_thermostat"])
@pytest.mark.parametrize("attributes", [{"1/513/0": None}])
async def test_thermostat_with_null_local_temperature(
hass: HomeAssistant,
matter_client: MagicMock,
matter_node: MatterNode,
) -> None:
"""Test thermostat is created when LocalTemperature is null."""
state = hass.states.get("climate.longan_link_hvac")
assert state
assert state.attributes["current_temperature"] is None