struct OverallCurrentStateStructThe current state of the closure.
-
The current Position state of the closure, as defined in the
CurrentPositionEnum.Declaration
Swift
let position: Matter.ClosureControlTrait.CurrentPositionEnum? -
The current latch state of the closure. A null value indicates that the state is not known.
Declaration
Swift
let latch: Bool? -
The current speed state of the closure, as defined in the
ThreeLevelAutoEnum.Declaration
Swift
let speed: Matter.ClosureControlTrait.ThreeLevelAutoEnum? -
The current secure state of the closure. A secure state requires the closure to meet both of the following conditions defined by the
OverallCurrentStateStruct:- If the
Positioningfeature is supported, then the Position field ofOverallCurrentStateisFullyClosed. - If the
MotionLatchingfeature is supported, then theLatchfieldof OverallCurrentStateisTrue.
Declaration
Swift
let secureState: Bool? - If the
-
Creates a new Struct instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throwsParameters
decoderThe raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder. ThrowsHomeError.parseErrorif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)?