TemperatureControlTemplate
  public
  
  final
  
  class
  TemperatureControlTemplate
  
  
  
  
    extends ControlTemplate
  
  
  
  
  
  
| java.lang.Object | ||
| ↳ | android.service.controls.templates.ControlTemplate | |
| ↳ | android.service.controls.templates.TemperatureControlTemplate | |
A template for a temperature related Control that supports multiple modes.
 Both the current mode and the active mode for the control can be specified. The combination of
 the Control.getDeviceType and the current and active mode will determine colors and
 transitions for the UI element.
Summary
| Constants | |
|---|---|
| int | FLAG_MODE_COOLFlag to indicate that the device supports cool mode. | 
| int | FLAG_MODE_ECOFlag to indicate that the device supports eco mode. | 
| int | FLAG_MODE_HEATFlag to indicate that the device supports heat mode. | 
| int | FLAG_MODE_HEAT_COOLFlag to indicate that the device supports heat-cool mode. | 
| int | FLAG_MODE_OFFFlag to indicate that the device supports off mode. | 
| int | MODE_COOLIndicates that the current or active mode of the device is set to cool. | 
| int | MODE_ECOIndicates that the current or active mode of the device is set to eco. | 
| int | MODE_HEATIndicates that the current or active mode of the device is set to heat. | 
| int | MODE_HEAT_COOLIndicates that the current or active mode of the device is set to heat-cool. | 
| int | MODE_OFFIndicates that the current or active mode of the device is off. | 
| int | MODE_UNKNOWNUse when the current or active mode of the device is not known
  | 
| Inherited constants | 
|---|
| Public constructors | |
|---|---|
| 
      TemperatureControlTemplate(String templateId, ControlTemplate controlTemplate, int currentMode, int currentActiveMode, int modesFlag)
      Construct a new  | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        int | 
      getCurrentActiveMode()
       | 
| 
        
        
        
        
        
        int | 
      getCurrentMode()
       | 
| 
        
        
        
        
        
        int | 
      getModes()
       | 
| 
        
        
        
        
        
        ControlTemplate | 
      getTemplate()
       | 
| 
        
        
        
        
        
        int | 
      getTemplateType()
      The template type associated with this class. | 
| Inherited methods | |
|---|---|
Constants
FLAG_MODE_COOL
public static final int FLAG_MODE_COOL
Flag to indicate that the device supports cool mode.
Constant Value: 8 (0x00000008)
FLAG_MODE_ECO
public static final int FLAG_MODE_ECO
Flag to indicate that the device supports eco mode.
Constant Value: 32 (0x00000020)
FLAG_MODE_HEAT
public static final int FLAG_MODE_HEAT
Flag to indicate that the device supports heat mode.
Constant Value: 4 (0x00000004)
FLAG_MODE_HEAT_COOL
public static final int FLAG_MODE_HEAT_COOL
Flag to indicate that the device supports heat-cool mode.
Constant Value: 16 (0x00000010)
FLAG_MODE_OFF
public static final int FLAG_MODE_OFF
Flag to indicate that the device supports off mode.
Constant Value: 2 (0x00000002)
MODE_COOL
public static final int MODE_COOL
Indicates that the current or active mode of the device is set to cool.
 
 Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 3 (0x00000003)
MODE_ECO
public static final int MODE_ECO
Indicates that the current or active mode of the device is set to eco.
 
 Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 5 (0x00000005)
MODE_HEAT
public static final int MODE_HEAT
Indicates that the current or active mode of the device is set to heat.
 
 Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 2 (0x00000002)
MODE_HEAT_COOL
public static final int MODE_HEAT_COOL
Indicates that the current or active mode of the device is set to heat-cool.
 
 Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 4 (0x00000004)
MODE_OFF
public static final int MODE_OFF
Indicates that the current or active mode of the device is off.
 
 Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 1 (0x00000001)
MODE_UNKNOWN
public static final int MODE_UNKNOWN
Use when the current or active mode of the device is not known
 
 Value is MODE_UNKNOWN, MODE_OFF, MODE_HEAT, MODE_COOL, MODE_HEAT_COOL, or MODE_ECO
Constant Value: 0 (0x00000000)
Public constructors
TemperatureControlTemplate
public TemperatureControlTemplate (String templateId, ControlTemplate controlTemplate, int currentMode, int currentActiveMode, int modesFlag)
Construct a new TemperatureControlTemplate.
 The current and active mode have to be among the ones supported by the flags.
| Parameters | |
|---|---|
| templateId | String: the identifier for this template object
 This value cannot benull. | 
| controlTemplate | ControlTemplate: a template to use for interaction with the user
 This value cannot benull. | 
| currentMode | int: the current mode for theControlValue isMODE_UNKNOWN,MODE_OFF,MODE_HEAT,MODE_COOL,MODE_HEAT_COOL, orMODE_ECO | 
| currentActiveMode | int: the current active mode for theControlValue isMODE_UNKNOWN,MODE_OFF,MODE_HEAT,MODE_COOL,MODE_HEAT_COOL, orMODE_ECO | 
| modesFlag | int: a flag representing the available modes for theControlValue is either0or a combination ofFLAG_MODE_OFF,FLAG_MODE_HEAT,FLAG_MODE_COOL,FLAG_MODE_HEAT_COOL, andFLAG_MODE_ECO | 
| Throws | |
|---|---|
| IllegalArgumentException | if the parameters passed do not make a valid template. | 
Public methods
getTemplate
public ControlTemplate getTemplate ()
| Returns | |
|---|---|
| ControlTemplate | This value cannot be null. | 
getTemplateType
public int getTemplateType ()
The template type associated with this class.
| Returns | |
|---|---|
| int | ControlTemplate.TYPE_TEMPERATURE | 
