Enum DoorState
- All Implemented Interfaces:
Comparable<DoorState>
The state of a door or garage door, for Trait.DOOR_STATE and
Trait.TARGET_DOOR_STATE.
Backend support
HomeKit publishes this directly. The Google Home APIs have an equivalent
through Google's own garage-door trait. Matter has no standard garage
cluster in the revisions shipping ecosystems support, so an Android build
running on Play services Matter commissioning alone -- see
HomeAvailability.COMMISSIONING_ONLY -- cannot see a garage door at all.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this state may be written toTrait.TARGET_DOOR_STATE.static DoorStateof(TraitValue value) Reads a door state out of a trait value, total: a value that is not an enum, or whose ordinal is outside this set, answersUNKNOWN.static DoorStateReturns the enum constant of this type with the specified name.static DoorState[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
OPEN
Fully open. -
CLOSED
Fully closed. -
OPENING
-
CLOSING
-
STOPPED
Halted part-way, usually because the user stopped it or an obstruction was hit. CheckTrait.OBSTRUCTION_DETECTED. A report only. -
UNKNOWN
The accessory could not say.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
of
Reads a door state out of a trait value, total: a value that is not an enum, or whose ordinal is outside this set, answers
UNKNOWN.Parameters
value: a value read fromTrait.DOOR_STATEorTrait.TARGET_DOOR_STATE, ornull
Returns
the state, never
null -
isWritable
public boolean isWritable()
-