class

Matter::Cluster::FanControlCluster

Inherits Matter::Cluster::Base < Reference < Object

Fan Control Cluster (0x0202)

Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.

Features:

  • MultiSpeed (SPD): Multi-speed fan control with discrete speed levels
  • Auto (AUTO): Automatic mode support
  • Rocking (RCK): Rocking movement support
  • Wind (WND): Wind emulation support
  • Step (STEP): Step command support for incremental speed changes
  • AirflowDirection (DIR): Airflow direction attribute

Specification: Matter 1.4 § 4.4

Constants

ATTR_AIRFLOW_DIRECTION = 11_u32

Attributes - AirflowDirection feature

ATTR_FAN_MODE = 0_u32

Attributes - Required

ATTR_FAN_MODE_SEQUENCE = 1_u32
ATTR_PERCENT_CURRENT = 3_u32
ATTR_PERCENT_SETTING = 2_u32
ATTR_ROCK_SETTING = 8_u32
ATTR_ROCK_SUPPORT = 7_u32

Attributes - Rocking feature

ATTR_SPEED_CURRENT = 6_u32
ATTR_SPEED_MAX = 4_u32

Attributes - MultiSpeed feature

ATTR_SPEED_SETTING = 5_u32
ATTR_WIND_SETTING = 10_u32
ATTR_WIND_SUPPORT = 9_u32

Attributes - Wind feature

CLUSTER_ID = 514_u32
CMD_STEP = 0_u32

Commands

Constructors

new(endpoint_id : DataType::EndpointNumber, feature_map : Feature = Feature::None, fan_mode : FanMode = FanMode::Off, fan_mode_sequence : FanModeSequence = FanModeSequence::OffLowMedHigh, percent_setting : UInt8 | Nil = 0_u8, percent_current : UInt8 = 0_u8, speed_max : UInt8 = 100_u8, speed_setting : UInt8 | Nil = 0_u8, speed_current : UInt8 = 0_u8, rock_support : RockSupport = RockSupport::None, rock_setting : RockSupport = RockSupport::None, wind_support : WindSupport = WindSupport::None, wind_setting : WindSupport = WindSupport::None, airflow_direction : AirflowDirectionEnum = AirflowDirectionEnum::Forward, step_percent : UInt8 = 25_u8)
Source

Class methods

cluster_id

Fan Control Cluster (0x0202)

Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.

Features:

  • MultiSpeed (SPD): Multi-speed fan control with discrete speed levels
  • Auto (AUTO): Automatic mode support
  • Rocking (RCK): Rocking movement support
  • Wind (WND): Wind emulation support
  • Step (STEP): Step command support for incremental speed changes
  • AirflowDirection (DIR): Airflow direction attribute

Specification: Matter 1.4 § 4.4

Source

Instance methods

airflow_direction

AirflowDirection feature attribute

Source
airflow_direction=(airflow_direction : AirflowDirectionEnum)

AirflowDirection feature attribute

Source
attributes

Get all attribute metadata

Source
commands

Get all command metadata

Source
fan_mode

Required attributes

Source
fan_mode=(fan_mode : FanMode)

Required attributes

Source
fan_mode_sequence
Source
fan_mode_sequence=(fan_mode_sequence : FanModeSequence)
Source
feature_map

Feature map

Source
feature_map=(feature_map : Feature)

Feature map

Source
invoke_command(command_id : UInt32, command_data : Bytes) : Bytes | InteractionModel::Status

Invoke a command

Source
name

Get cluster name

Source
on_fan_mode_changed
Source
on_percent_changed
Source
on_speed_changed
Source
percent_current
Source
percent_current=(percent_current : UInt8)
Source
percent_setting
Source
percent_setting=(percent_setting : UInt8 | Nil)
Source
read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : Bytes | InteractionModel::Status

Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster

Source
rock_setting
Source
rock_setting=(rock_setting : RockSupport)
Source
rock_support

Rocking feature attributes

Source
rock_support=(rock_support : RockSupport)

Rocking feature attributes

Source
speed_current
Source
speed_current=(speed_current : UInt8)
Source
speed_max

MultiSpeed feature attributes

Source
speed_max=(speed_max : UInt8)

MultiSpeed feature attributes

Source
speed_setting
Source
speed_setting=(speed_setting : UInt8 | Nil)
Source
step_percent

Step command configuration

Source
step_percent=(step_percent : UInt8)

Step command configuration

Source
update_percent_current(percent : UInt8)

Update the current fan speed percentage (read-only attribute updated by implementation)

Source
wind_setting
Source
wind_setting=(wind_setting : WindSupport)
Source
wind_support

Wind feature attributes

Source
wind_support=(wind_support : WindSupport)

Wind feature attributes

Source
write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status

Write an attribute value

Source

Nested types