diff --git a/homeassistant/components/matter/climate.py b/homeassistant/components/matter/climate.py index a67d5dcc8eb..d1699beaa60 100644 --- a/homeassistant/components/matter/climate.py +++ b/homeassistant/components/matter/climate.py @@ -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, ), ] diff --git a/tests/components/matter/test_climate.py b/tests/components/matter/test_climate.py index b0bf32461c4..b6d7fa3e902 100644 --- a/tests/components/matter/test_climate.py +++ b/tests/components/matter/test_climate.py @@ -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