TemperatureControlTemplate
class TemperatureControlTemplate : ControlTemplate
kotlin.Any | ||
↳ | 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 | |
---|---|
static Int |
Flag to indicate that the device supports cool mode. |
static Int |
Flag to indicate that the device supports eco mode. |
static Int |
Flag to indicate that the device supports heat mode. |
static Int |
Flag to indicate that the device supports heat-cool mode. |
static Int |
Flag to indicate that the device supports off mode. |
static Int |
Indicates that the current or active mode of the device is set to cool. |
static Int |
Indicates that the current or active mode of the device is set to eco. |
static Int |
Indicates that the current or active mode of the device is set to heat. |
static Int |
Indicates that the current or active mode of the device is set to heat-cool. |
static Int |
Indicates that the current or active mode of the device is off. |
static Int |
Use when the current or active mode of the device is not known |
Inherited constants | |
---|---|
Public constructors | |
---|---|
TemperatureControlTemplate(templateId: String, controlTemplate: ControlTemplate, currentMode: Int, currentActiveMode: Int, modesFlag: Int) Construct a new |
Public methods | |
---|---|
Int | |
Int | |
Int |
getModes() |
ControlTemplate | |
Int |
Inherited functions | |
---|---|
Constants
FLAG_MODE_COOL
static val FLAG_MODE_COOL: Int
Flag to indicate that the device supports cool mode.
Value: 8
FLAG_MODE_ECO
static val FLAG_MODE_ECO: Int
Flag to indicate that the device supports eco mode.
Value: 32
FLAG_MODE_HEAT
static val FLAG_MODE_HEAT: Int
Flag to indicate that the device supports heat mode.
Value: 4
FLAG_MODE_HEAT_COOL
static val FLAG_MODE_HEAT_COOL: Int
Flag to indicate that the device supports heat-cool mode.
Value: 16
FLAG_MODE_OFF
static val FLAG_MODE_OFF: Int
Flag to indicate that the device supports off mode.
Value: 2
MODE_COOL
static val MODE_COOL: Int
Indicates that the current or active mode of the device is set to cool.
Value is android.service.controls.templates.TemperatureControlTemplate#MODE_UNKNOWN
, android.service.controls.templates.TemperatureControlTemplate#MODE_OFF
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT
, android.service.controls.templates.TemperatureControlTemplate#MODE_COOL
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT_COOL
, or android.service.controls.templates.TemperatureControlTemplate#MODE_ECO
Value: 3
MODE_ECO
static val MODE_ECO: Int
Indicates that the current or active mode of the device is set to eco.
Value is android.service.controls.templates.TemperatureControlTemplate#MODE_UNKNOWN
, android.service.controls.templates.TemperatureControlTemplate#MODE_OFF
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT
, android.service.controls.templates.TemperatureControlTemplate#MODE_COOL
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT_COOL
, or android.service.controls.templates.TemperatureControlTemplate#MODE_ECO
Value: 5
MODE_HEAT
static val MODE_HEAT: Int
Indicates that the current or active mode of the device is set to heat.
Value is android.service.controls.templates.TemperatureControlTemplate#MODE_UNKNOWN
, android.service.controls.templates.TemperatureControlTemplate#MODE_OFF
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT
, android.service.controls.templates.TemperatureControlTemplate#MODE_COOL
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT_COOL
, or android.service.controls.templates.TemperatureControlTemplate#MODE_ECO
Value: 2
MODE_HEAT_COOL
static val MODE_HEAT_COOL: Int
Indicates that the current or active mode of the device is set to heat-cool.
Value is android.service.controls.templates.TemperatureControlTemplate#MODE_UNKNOWN
, android.service.controls.templates.TemperatureControlTemplate#MODE_OFF
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT
, android.service.controls.templates.TemperatureControlTemplate#MODE_COOL
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT_COOL
, or android.service.controls.templates.TemperatureControlTemplate#MODE_ECO
Value: 4
MODE_OFF
static val MODE_OFF: Int
Indicates that the current or active mode of the device is off.
Value is android.service.controls.templates.TemperatureControlTemplate#MODE_UNKNOWN
, android.service.controls.templates.TemperatureControlTemplate#MODE_OFF
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT
, android.service.controls.templates.TemperatureControlTemplate#MODE_COOL
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT_COOL
, or android.service.controls.templates.TemperatureControlTemplate#MODE_ECO
Value: 1
MODE_UNKNOWN
static val MODE_UNKNOWN: Int
Use when the current or active mode of the device is not known
Value is android.service.controls.templates.TemperatureControlTemplate#MODE_UNKNOWN
, android.service.controls.templates.TemperatureControlTemplate#MODE_OFF
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT
, android.service.controls.templates.TemperatureControlTemplate#MODE_COOL
, android.service.controls.templates.TemperatureControlTemplate#MODE_HEAT_COOL
, or android.service.controls.templates.TemperatureControlTemplate#MODE_ECO
Value: 0
Public constructors
TemperatureControlTemplate
TemperatureControlTemplate(
templateId: String,
controlTemplate: ControlTemplate,
currentMode: Int,
currentActiveMode: Int,
modesFlag: Int)
Construct a new TemperatureControlTemplate
. The current and active mode have to be among the ones supported by the flags.
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the parameters passed do not make a valid template. |
Public methods
getTemplate
fun getTemplate(): ControlTemplate
Return | |
---|---|
ControlTemplate |
This value cannot be null . |
getTemplateType
fun getTemplateType(): Int
Return | |
---|---|
Int |
ControlTemplate#TYPE_TEMPERATURE |