class

Matter::Cluster::TemperatureMeasurementCluster

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

Temperature Measurement Cluster (0x0402)

Provides an interface to temperature measurement functionality, including configuration and provision of notifications of temperature measurements.

Temperature values are expressed in hundredths of degrees Celsius (0.01°C). For example, 2550 represents 25.50°C.

Specification: Matter 1.4 § 2.3

Constants

ATTR_MAX_MEASURED_VALUE = 2_u32
ATTR_MEASURED_VALUE = 0_u32

Attributes

ATTR_MIN_MEASURED_VALUE = 1_u32
ATTR_TOLERANCE = 3_u32
CLUSTER_ID = 1026_u32
MAX_TEMPERATURE = 32767_i16
MIN_TEMPERATURE = -27315_i16

Temperature limits (in 0.01°C)

Constructors

new(endpoint_id : DataType::EndpointNumber, measured_value : Int16 | Nil = nil, min_measured_value : Int16 = MIN_TEMPERATURE, max_measured_value : Int16 = MAX_TEMPERATURE, tolerance : UInt16 | Nil = nil)
Source

Class methods

cluster_id

Temperature Measurement Cluster (0x0402)

Provides an interface to temperature measurement functionality, including configuration and provision of notifications of temperature measurements.

Temperature values are expressed in hundredths of degrees Celsius (0.01°C). For example, 2550 represents 25.50°C.

Specification: Matter 1.4 § 2.3

Source
from_celsius(value : Float64) : Int16

Convert from Celsius (Float) to 0.01°C (Int16)

Source
from_fahrenheit(value : Float64) : Int16

Convert from Fahrenheit (Float) to 0.01°C (Int16)

Source
to_celsius(value : Int16) : Float64

Convert from 0.01°C to Celsius (Float)

Source
to_fahrenheit(value : Int16) : Float64

Convert from 0.01°C to Fahrenheit (Float)

Source

Instance methods

attributes

Get all attribute metadata

Source
commands

Get all command metadata

Source
max_measured_value

Maximum measurable temperature (in 0.01°C)

Source
max_measured_value=(max_measured_value : Int16)

Maximum measurable temperature (in 0.01°C)

Source
measured_value

Current measured temperature (in 0.01°C), or nil if unknown

Source
measured_value=(measured_value : Int16 | Nil)

Current measured temperature (in 0.01°C), or nil if unknown

Source
min_measured_value

Minimum measurable temperature (in 0.01°C)

Source
min_measured_value=(min_measured_value : Int16)

Minimum measurable temperature (in 0.01°C)

Source
name

Get cluster name

Source
on_temperature_changed
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
tolerance

Measurement tolerance (in 0.01°C), optional

Source
tolerance=(tolerance : UInt16 | Nil)

Measurement tolerance (in 0.01°C), optional

Source
update_temperature(value : Int16 | Nil)

Update the measured temperature value

Source