class
Matter::Cluster::FanControlCluster
- Matter::Cluster::FanControlCluster
- Matter::Cluster::Base
- Reference
- Object
Overview
Fan Control Cluster (0x0202)
Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.
This implementation provides the base functionality without optional features (MultiSpeed, Rocking, Wind, AirflowDirection, Step).
Specification: Matter 1.4 § 4.4
Defined in:
matter/cluster/fan_control_cluster.crConstant Summary
-
ATTR_FAN_MODE =
0_u32 -
Attributes
-
ATTR_FAN_MODE_SEQUENCE =
1_u32 -
ATTR_PERCENT_CURRENT =
3_u32 -
ATTR_PERCENT_SETTING =
2_u32 -
CLUSTER_ID =
514_u32
Constructors
Class Method Summary
-
.cluster_id
Fan Control Cluster (0x0202)
Instance Method Summary
-
#attributes : Array(AttributeMetadata)
Get all attribute metadata
-
#commands : Array(CommandMetadata)
Get all command metadata
-
#fan_mode : FanMode
Current fan mode (writable)
-
#fan_mode=(fan_mode : FanMode)
Current fan mode (writable)
-
#fan_mode_sequence : FanModeSequence
Supported fan mode sequence (fixed)
-
#fan_mode_sequence=(fan_mode_sequence : FanModeSequence)
Supported fan mode sequence (fixed)
-
#name : String
Get cluster name
- #on_fan_mode_changed(&block : FanMode, FanMode -> Nil)
- #on_percent_changed(&block : UInt8 | Nil, UInt8 -> Nil)
-
#percent_current : UInt8
Current actual fan speed percentage (0-100)
-
#percent_current=(percent_current : UInt8)
Current actual fan speed percentage (0-100)
-
#percent_setting : UInt8 | Nil
Desired fan speed percentage (0-100, nullable, writable)
-
#percent_setting=(percent_setting : UInt8 | Nil)
Desired fan speed percentage (0-100, nullable, writable)
-
#read_attribute(attribute_id : UInt32) : Bytes | InteractionModel::Status
Read an attribute value
-
#update_percent_current(percent : UInt8)
Update the current fan speed percentage (read-only attribute updated by implementation)
-
#write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute value
Instance methods inherited from class Matter::Cluster::Base
attributes : Array(AttributeMetadata)
attributes,
cluster_id : DataType::ClusterId
cluster_id,
cluster_id=(cluster_id : DataType::ClusterId)
cluster_id=,
commands : Array(CommandMetadata)
commands,
data_version : UInt32
data_version,
data_version=(data_version : UInt32)
data_version=,
endpoint_id : DataType::EndpointNumber
endpoint_id,
endpoint_id=(endpoint_id : DataType::EndpointNumber)
endpoint_id=,
events : Array(EventMetadata)
events,
get_attribute_metadata(attribute_id : UInt32) : AttributeMetadata | Nil
get_attribute_metadata,
get_command_metadata(command_id : UInt32) : CommandMetadata | Nil
get_command_metadata,
invoke_command(command_id : UInt32, fields : Bytes = Bytes.new(0)) : InteractionModel::Status | Bytes
invoke_command,
name : String
name,
read_attribute(attribute_id : UInt32) : InteractionModel::Status | Bytes
read_attribute,
write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
write_attribute
Constructor methods inherited from class Matter::Cluster::Base
new(endpoint_id : DataType::EndpointNumber, cluster_id : DataType::ClusterId)
new
Constructor Detail
Class Method Detail
Fan Control Cluster (0x0202)
Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.
This implementation provides the base functionality without optional features (MultiSpeed, Rocking, Wind, AirflowDirection, Step).
Specification: Matter 1.4 § 4.4
Instance Method Detail
Get all attribute metadata
Get all command metadata
Desired fan speed percentage (0-100, nullable, writable)
Read an attribute value
Update the current fan speed percentage (read-only attribute updated by implementation)
Write an attribute value