Enum AlarmState
- All Implemented Interfaces:
Comparable<AlarmState>
The state of a life-safety alarm, for Trait.SMOKE_DETECTED and
Trait.CO_DETECTED. Read-only.
Read the caveat before you build on this
This API is not a fire-alarm system and must not be the only thing standing
between a user and a fire. Notifications here arrive only while the app is
running -- see TraitSubscription.isPushDelivery() -- and a sleeping phone
is told nothing. Treat these values as information, never as a warning
channel.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AlarmStateof(TraitValue value) Reads an alarm state out of a trait value, total: a value that is not an enum, or whose ordinal is outside this set, answersUNKNOWN.static AlarmStateReturns the enum constant of this type with the specified name.static AlarmState[]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
-
NORMAL
Nothing detected. -
WARNING
Detected below the alarm threshold.
HomeKit never produces this: its smoke and carbon-monoxide characteristics are two-state, so anything it detects arrives as
CRITICAL. -
CRITICAL
Detected at or above the alarm threshold. -
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 an alarm 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.SMOKE_DETECTEDorTrait.CO_DETECTED, ornull
Returns
the state, never
null
-