Repository: home-assistant/core
File: homeassistant/components/matter/number.py (Python)

Code before:
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
    ),
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="pump_setpoint",
            native_unit_of_measurement=PERCENTAGE,
            translation_key="pump_setpoint",
            native_max_value=100,
            native_min_value=0.5,
            native_step=0.5,
            device_to_ha=(
                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.5–100.0%
            mode=NumberMode.SLIDER,
        ),
        entity_class=MatterLevelControlNumber,
        required_attributes=(clusters.LevelControl.Attributes.CurrentLevel,),
        device_type=(device_types.Pump,),
        allow_multi=True,
    ),
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="PIROccupiedToUnoccupiedDelay",
            entity_category=EntityCategory.CONFIG,
            translation_key="hold_time",  # pir_occupied_to_unoccupied_delay for old revisions
            native_max_value=65534,
            native_min_value=0,
            native_unit_of_measurement=UnitOfTime.SECONDS,
            mode=NumberMode.BOX,
        ),
        entity_class=MatterNumber,
        required_attributes=(
            clusters.OccupancySensing.Attributes.PIROccupiedToUnoccupiedDelay,
        ),
        absent_attributes=(clusters.OccupancySensing.Attributes.HoldTime,),
    ),
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="OccupancySensingHoldTime",
            entity_category=EntityCategory.CONFIG,
            translation_key="hold_time",
            native_max_value=65534,
            native_min_value=1,

Review comment (suggestion):
We should be able to do something [similar to this](https://github.com/home-assistant/core/blob/0623da8aa93971b5867824f0e607c6aa937f309f/homeassistant/components/matter/binary_sensor.py#L66-L101) to get the Eve-specific entity with the higher min/max values just for Eve, and the generic Matter 1.3 temperature offset entity with the lower limits for everything else.

The order of the discovery schemas here matters then. Since `allow_multi=False` by default, the `EveTemperatureOffset` entity should "use" the `LocalTemperatureCalibration` attribute for itself if the `vendor_id` matches. The generic `TemperatureOffset` schema will not be discovered then.

But for all other vendor IDs, the generic `TemperatureOffset` schema/entity will be discovered, since the underlying attribute is "not used", yet.

So, maybe something like this. It's not completely ideal, but I think it's the best we can do:
```suggestion
    # Eve temperature offset with higher min/max
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="EveTemperatureOffset",
            device_class=NumberDeviceClass.TEMPERATURE,
            entity_category=EntityCategory.CONFIG,
            translation_key="temperature_offset",
            native_max_value=50,
            native_min_value=-50,
            native_step=0.5,
            native_unit_of_measurement=UnitOfTemperature.CELSIUS,
            device_to_ha=lambda x: None if x is None else x / 10,
            ha_to_device=lambda x: round(x * 10),
            mode=NumberMode.BOX,
        ),
        entity_class=MatterNumber,
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
        vendor_id=(4874,),
    ),
    # Generic temperature offset with Matter 1.3 limit
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="TemperatureOffset",
            device_class=NumberDeviceClass.TEMPERATURE,
            entity_category=EntityCategory.CONFIG,
            translation_key="temperature_offset",
            native_max_value=25,
            native_min_value=-25,
            native_step=0.5,
            native_unit_of_measurement=UnitOfTemperature.CELSIUS,
            device_to_ha=lambda x: None if x is None else x / 10,
            ha_to_device=lambda x: round(x * 10),
            mode=NumberMode.BOX,
        ),
        entity_class=MatterNumber,
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
    ),
```

<details><summary>And just the new Python code, in case the GitHub suggestion doesn't work properly (CLICK TO OPEN):</summary>

```python
    # Eve temperature offset with higher min/max
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="EveTemperatureOffset",
            device_class=NumberDeviceClass.TEMPERATURE,
            entity_category=EntityCategory.CONFIG,
            translation_key="temperature_offset",
            native_max_value=50,
            native_min_value=-50,
            native_step=0.5,
            native_unit_of_measurement=UnitOfTemperature.CELSIUS,
            device_to_ha=lambda x: None if x is None else x / 10,
            ha_to_device=lambda x: round(x * 10),
            mode=NumberMode.BOX,
        ),
        entity_class=MatterNumber,
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
        vendor_id=(4874,),
    ),
    # Generic temperature offset with Matter 1.3 limit
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="TemperatureOffset",
            device_class=NumberDeviceClass.TEMPERATURE,
            entity_category=EntityCategory.CONFIG,
            translation_key="temperature_offset",
            native_max_value=25,
            native_min_value=-25,
            native_step=0.5,
            native_unit_of_measurement=UnitOfTemperature.CELSIUS,
            device_to_ha=lambda x: None if x is None else x / 10,
            ha_to_device=lambda x: round(x * 10),
            mode=NumberMode.BOX,
        ),
        entity_class=MatterNumber,
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
    ),
```

</details>

(Not tested and just pasted together in the GitHub comment editor, so needs to be tested properly with both Eve and non-Eve thermostats.)

Code after:
        entity_class=MatterNumber,
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
        vendor_id=(4874,),  # Eve Systems
    ),
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="TemperatureOffset",
            device_class=NumberDeviceClass.TEMPERATURE,
            entity_category=EntityCategory.CONFIG,
            translation_key="temperature_offset",
            native_max_value=25,  # Matter 1.3 limit
            native_min_value=-25,  # Matter 1.3 limit
            native_step=0.5,
            native_unit_of_measurement=UnitOfTemperature.CELSIUS,
            device_to_ha=lambda x: None if x is None else x / 10,
            ha_to_device=lambda x: round(x * 10),
            mode=NumberMode.BOX,
        ),
        entity_class=MatterNumber,
        required_attributes=(
            clusters.Thermostat.Attributes.LocalTemperatureCalibration,
        ),
    ),
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(
            key="pump_setpoint",
            native_unit_of_measurement=PERCENTAGE,
            translation_key="pump_setpoint",
            native_max_value=100,
            native_min_value=0.5,
            native_step=0.5,
            device_to_ha=(
                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.5–100.0%
            mode=NumberMode.SLIDER,
        ),
        entity_class=MatterLevelControlNumber,
        required_attributes=(clusters.LevelControl.Attributes.CurrentLevel,),
        device_type=(device_types.Pump,),
        allow_multi=True,
    ),
    MatterDiscoverySchema(
        platform=Platform.NUMBER,
        entity_description=MatterNumberEntityDescription(