Enum ServiceType
- All Implemented Interfaces:
Comparable<ServiceType>
What one AccessoryService is: HomeKit's HMService type, Matter's device
type on an endpoint.
As with AccessoryCategory, this is for labelling rather than for deciding
what to call. Ask AccessoryService.supports(Trait).
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn air purifier.An air quality sensor.A battery, reported as a service of its own soTrait.BATTERY_LEVELand its siblings have somewhere to live.A carbon monoxide alarm.A door or window contact sensor.A powered door.A fan.A garage door opener.A humidity sensor.A water leak sensor.An ambient light sensor.A dimmable or colour light.A lock mechanism.A motion sensor.An occupancy sensor.Anything else, including a service type one platform has and this API does not.A mains socket.A smoke alarm.A speaker.An on-off switch.A temperature sensor.A thermostat.A blind, shade or curtain. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceTypeReturns the enum constant of this type with the specified name.static ServiceType[]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
-
LIGHTBULB
A dimmable or colour light. -
SWITCH
An on-off switch. -
OUTLET
A mains socket. -
THERMOSTAT
A thermostat. -
LOCK_MECHANISM
A lock mechanism. -
DOOR
A powered door. -
GARAGE_DOOR_OPENER
A garage door opener. -
WINDOW_COVERING
A blind, shade or curtain. -
FAN
A fan. -
AIR_PURIFIER
An air purifier. -
MOTION_SENSOR
A motion sensor. -
OCCUPANCY_SENSOR
An occupancy sensor. On Matter this andMOTION_SENSORare the same device type; seeTrait.MOTION_DETECTED. -
CONTACT_SENSOR
A door or window contact sensor. -
TEMPERATURE_SENSOR
A temperature sensor. -
HUMIDITY_SENSOR
A humidity sensor. -
LIGHT_SENSOR
An ambient light sensor. -
SMOKE_SENSOR
A smoke alarm. -
CARBON_MONOXIDE_SENSOR
A carbon monoxide alarm. -
LEAK_SENSOR
A water leak sensor. -
AIR_QUALITY_SENSOR
An air quality sensor. -
BATTERY
A battery, reported as a service of its own soTrait.BATTERY_LEVELand its siblings have somewhere to live. -
SPEAKER
A speaker. SeeTrait.VOLUME. -
OTHER
Anything else, including a service type one platform has and this API does not.
-
-
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
-