public enum AlarmState
- Object
- Enum<AlarmState>
- AlarmState
ImplementsComparable<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 constants
NORMAL | Nothing detected. |
WARNING | Detected below the alarm threshold. |
CRITICAL | Detected at or above the alarm threshold. |
UNKNOWN | The accessory could not say. |
Methods
public static AlarmState[] values() | |
public static AlarmState valueOf(String name) | |
public static AlarmState of(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, answers UNKNOWN. |
Inherited methods
Enum constant details
NORMAL
NORMALNothing detected.
WARNING
WARNINGDetected 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
CRITICALDetected at or above the alarm threshold.
UNKNOWN
UNKNOWNThe accessory could not say.
Method details
values
public static AlarmState[] values()valueOf
public static AlarmState valueOf(String name)of
public static AlarmState of(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, answers
UNKNOWN.Parameters
valueTraitValue- a value read from
Trait.SMOKE_DETECTEDorTrait.CO_DETECTED, ornull
Returns
the state, never
null