public enum DoorState
- Object
- Enum<DoorState>
- DoorState
ImplementsComparable<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 constants
OPEN | Fully open. |
CLOSED | Fully closed. |
OPENING | Moving toward OPEN. |
CLOSING | Moving toward CLOSED. |
STOPPED | Halted part-way, usually because the user stopped it or an obstruction was hit. |
UNKNOWN | The accessory could not say. |
Methods
public static DoorState[] values() | |
public static DoorState valueOf(String name) | |
public static DoorState of(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, answers UNKNOWN. |
public boolean isWritable() | Whether this state may be written to Trait.TARGET_DOOR_STATE. |
Inherited methods
Enum constant details
OPEN
OPENFully open.
CLOSED
CLOSEDFully closed.
OPENING
OPENINGMoving toward
OPEN. A report only; not writable.CLOSING
CLOSINGMoving toward
CLOSED. A report only; not writable.STOPPED
STOPPEDHalted part-way, usually because the user stopped it or an obstruction
was hit. Check
Trait.OBSTRUCTION_DETECTED. A report only.UNKNOWN
UNKNOWNThe accessory could not say.
Method details
values
public static DoorState[] values()valueOf
public static DoorState valueOf(String name)of
public static DoorState of(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, answers
UNKNOWN.Parameters
valueTraitValue- a value read from
Trait.DOOR_STATEorTrait.TARGET_DOOR_STATE, ornull
Returns
the state, never
nullisWritable
public boolean isWritable()Whether this state may be written to
Trait.TARGET_DOOR_STATE.