Skip to content

Matter thermostat: thermostatFanMode.supportedThermostatFanModes should be more granular #2187

@ldeora

Description

@ldeora

There are HVAC devices that don't accept on as a FanMode. The device in question only supports auto, low, medium and high, and probably off.

Presentation:

Image

Log:

2025-06-09T15:27:48.782107371-04:00 TRACE Matter Thermostat  Received event with handler capability
2025-06-09T15:27:48.790108658-04:00 INFO Matter Thermostat  <MatterDevice: 343bbfb5-e7bd-47b6-8937-18a0926429d5 [DCC8C6C12416DDB8-3A3D26703154CFF7] (Air Conditioner)> received command: {"args":{"mode":"on"},"capability":"thermostatFanMode","command":"setThermostatFanMode","component":"main","named_args":{"mode":"on"},"positional_args":["on"]}
2025-06-09T15:27:48.794101176-04:00 TRACE Matter Thermostat  Found CapabilityCommandDispatcher handler in matter-thermostat
2025-06-09T15:27:48.795896972-04:00 INFO Matter Thermostat  <MatterDevice: 343bbfb5-e7bd-47b6-8937-18a0926429d5 [DCC8C6C12416DDB8-3A3D26703154CFF7] (Air Conditioner)> sending InteractionRequest: <InteractionRequest || type: WRITE, info_blocks: [<InteractionInfoBlock || endpoint: 0x01, cluster: FanControl, attribute: FanMode, data: FanModeEnum: ON>]>
2025-06-09T15:27:48.810067166-04:00 DEBUG Matter Thermostat  Matter Thermostat device thread event handled
2025-06-09T15:27:53.854571714-04:00 TRACE Matter Thermostat  Received event with handler matter
2025-06-09T15:27:53.857629429-04:00 INFO Matter Thermostat  <MatterDevice: 343bbfb5-e7bd-47b6-8937-18a0926429d5 [DCC8C6C12416DDB8-3A3D26703154CFF7] (Air Conditioner)> received InteractionResponse: <InteractionResponse || type: WRITE_RESPONSE, response_blocks: [<InteractionResponseInfoBlock || status: FAILURE, <InteractionInfoBlock || endpoint: 0x01, cluster: FanControl, attribute: FanMode>>]>
2025-06-09T15:27:53.863959715-04:00 DEBUG Matter Thermostat  Matter Thermostat device thread event handled

Discussion:

https://community.smartthings.com/t/midea-matter-support-issue/301417

Code:

-- Thermostat
-- Our thermostat fan mode control is probably not granular enough to handle the supported modes here well
-- definitely meant for actual fans and not HVAC fans
if ib.data.value >= clusters.FanControl.attributes.FanModeSequence.OFF_LOW_MED_HIGH_AUTO and
ib.data.value <= clusters.FanControl.attributes.FanModeSequence.OFF_ON_AUTO then
device:emit_event_for_endpoint(ib.endpoint_id, capabilities.thermostatFanMode.supportedThermostatFanModes(
{capabilities.thermostatFanMode.thermostatFanMode.auto.NAME, capabilities.thermostatFanMode.thermostatFanMode.on.NAME},
{visibility = {displayed = false}}
))
else
device:emit_event_for_endpoint(ib.endpoint_id, capabilities.thermostatFanMode.supportedThermostatFanModes(
{capabilities.thermostatFanMode.thermostatFanMode.on.NAME},
{visibility = {displayed = false}}
))
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions