Enum AccessoryCategory

java.lang.Object
java.lang.Enum<AccessoryCategory>
com.codename1.home.AccessoryCategory
All Implemented Interfaces:
Comparable<AccessoryCategory>

public enum AccessoryCategory extends Enum<AccessoryCategory>

Roughly what an Accessory is, for picking an icon and grouping a list.

Do not branch capability on this. What an accessory can actually do is its AccessoryServices and their Traits; a device that calls itself a switch may well dim, and a light strip may report temperature. This is a label for the user interface, and the two platforms' own categorizations are only approximately alike.

  • Enum Constant Details

    • LIGHT

      public static final AccessoryCategory LIGHT
      A lamp, bulb or light strip.
    • SWITCH

      public static final AccessoryCategory SWITCH
      A wall switch or relay.
    • OUTLET

      public static final AccessoryCategory OUTLET
      A smart plug or socket.
    • THERMOSTAT

      public static final AccessoryCategory THERMOSTAT
      A thermostat.
    • LOCK

      public static final AccessoryCategory LOCK
      A door lock.
    • GARAGE_DOOR_OPENER

      public static final AccessoryCategory GARAGE_DOOR_OPENER
      A garage door opener.
    • WINDOW_COVERING

      public static final AccessoryCategory WINDOW_COVERING
      A blind, shade, curtain or shutter.
    • SENSOR

      public static final AccessoryCategory SENSOR
      A sensor of any kind -- motion, contact, temperature, leak, air quality. Read the services to find out which.
    • FAN

      public static final AccessoryCategory FAN
      A fan.
    • AIR_PURIFIER

      public static final AccessoryCategory AIR_PURIFIER
      An air purifier.
    • SPEAKER

      public static final AccessoryCategory SPEAKER
      A speaker. See Trait.VOLUME for why very few real devices land here.
    • TELEVISION

      public static final AccessoryCategory TELEVISION
      A television or set-top box.
    • CAMERA

      public static final AccessoryCategory CAMERA
      A camera. This release exposes no stream, snapshot or recording API; the category exists so a camera is visible in the graph rather than missing from it.
    • DOORBELL

      public static final AccessoryCategory DOORBELL
      A video or audio doorbell.
    • BRIDGE

      public static final AccessoryCategory BRIDGE
      A hub that other accessories sit behind. Its children report Accessory.isBridged() and name it through Accessory.getBridgeAccessoryId().
    • SECURITY_SYSTEM

      public static final AccessoryCategory SECURITY_SYSTEM
      An alarm panel. This release exposes no arm or disarm API; a half-working alarm is a safety problem rather than a feature gap.
    • OTHER

      public static final AccessoryCategory OTHER
      Anything else, including a category one platform has and this API does not.
  • Method Details

    • values

      public static AccessoryCategory[] 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

      public static AccessoryCategory valueOf(String name)
      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 name
      NullPointerException - if the argument is null