matterbridge icon indicating copy to clipboard operation
matterbridge copied to clipboard

[Feature request] Support for Thermostat.Feature.Presets

Open lboue opened this issue 2 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Add support for Thermostat Presets feature.

Describe the solution you'd like

  • Implement presets attributes
  • React to preset selection and apply parameters to the thermostat

Describe alternatives you've considered N/A

Additional context

Built SDK example: https://github.com/project-chip/connectedhomeip/blob/3732a89eb8d5e91b86e099677cdb254a6b9ff6ff/examples/thermostat/thermostat-common/src/thermostat-delegate-impl.cpp#L44

There are 2 built in presets - occupied and unoccupied:

    for (PresetScenarioEnum presetScenario : presetScenarioEnumArray)
    {
        mPresets[index].SetPresetScenario(presetScenario);

        // Set the preset handle to the preset scenario value as a unique id.
        const uint8_t handle[] = { static_cast<uint8_t>(presetScenario) };
        mPresets[index].SetPresetHandle(DataModel::MakeNullable(ByteSpan(handle)));
        mPresets[index].SetName(NullOptional);
        int16_t coolingSetpointValue = static_cast<int16_t>(2500 + (index * 100));
        mPresets[index].SetCoolingSetpoint(MakeOptional(coolingSetpointValue));

        int16_t heatingSetpointValue = static_cast<int16_t>(2100 - (index * 100));
        mPresets[index].SetHeatingSetpoint(MakeOptional(heatingSetpointValue));
        mPresets[index].SetBuiltIn(DataModel::MakeNullable(true));
        index++;
    }

matter-01K3S6WBF6Z73R8YWKKA5M04T8-TEST_PRODUCT-a1049fcb71ae07424e27f5cf05a44def.json

image

SetActivePresetRequest

        await self.send_device_command(
            clusters.Thermostat.Commands.SetActivePresetRequest(preset=b"\x01")
        )

lboue avatar Oct 12 '25 20:10 lboue

Waiting for 3.4.0 release (matter.js v0.16.0 as a prerequisite)

lboue avatar Nov 21 '25 15:11 lboue