Added in API level 30

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 TemperatureControlTemplate.

Public methods
Int

Int

Int

ControlTemplate

Int

Inherited functions

Constants

FLAG_MODE_COOL

Added in API level 30
static val FLAG_MODE_COOL: Int

Flag to indicate that the device supports cool mode.

Value: 8

FLAG_MODE_ECO

Added in API level 30
static val FLAG_MODE_ECO: Int

Flag to indicate that the device supports eco mode.

Value: 32

FLAG_MODE_HEAT

Added in API level 30
static val FLAG_MODE_HEAT: Int

Flag to indicate that the device supports heat mode.

Value: 4

FLAG_MODE_HEAT_COOL

Added in API level 30
static val FLAG_MODE_HEAT_COOL: Int

Flag to indicate that the device supports heat-cool mode.

Value: 16

FLAG_MODE_OFF

Added in API level 30
static val FLAG_MODE_OFF: Int

Flag to indicate that the device supports off mode.

Value: 2

MODE_COOL

Added in API level 30
static val MODE_COOL: Int

Indicates that the current or active mode of the device is set to cool.
Value is one of the following:

Value: 3

MODE_ECO

Added in API level 30
static val MODE_ECO: Int

Indicates that the current or active mode of the device is set to eco.
Value is one of the following:

Value: 5

MODE_HEAT

Added in API level 30
static val MODE_HEAT: Int

Indicates that the current or active mode of the device is set to heat.
Value is one of the following:

Value: 2

MODE_HEAT_COOL

Added in API level 30
static val MODE_HEAT_COOL: Int

Indicates that the current or active mode of the device is set to heat-cool.
Value is one of the following:

Value: 4

MODE_OFF

Added in API level 30
static val MODE_OFF: Int

Indicates that the current or active mode of the device is off.
Value is one of the following:

Value: 1

MODE_UNKNOWN

Added in API level 30
static val MODE_UNKNOWN: Int

Use when the current or active mode of the device is not known.
Value is one of the following:

Value: 0

Public constructors

TemperatureControlTemplate

Added in API level 30
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.

Parameters
templateId String: the identifier for this template object.
This value cannot be null.
controlTemplate ControlTemplate: a template to use for interaction with the user.
This value cannot be null.
currentMode Int: the current mode for the Control
Value is one of the following:
currentActiveMode Int: the current active mode for the Control
Value is one of the following:
modesFlag Int: a flag representing the available modes for the Control
Value is either 0 or a combination of the following:
Exceptions
java.lang.IllegalArgumentException if the parameters passed do not make a valid template.

Public methods

getCurrentActiveMode

Added in API level 30
fun getCurrentActiveMode(): Int

getCurrentMode

Added in API level 30
fun getCurrentMode(): Int

getModes

Added in API level 30
fun getModes(): Int

getTemplate

Added in API level 30
fun getTemplate(): ControlTemplate
Return
ControlTemplate This value cannot be null.

getTemplateType

Added in API level 30
fun getTemplateType(): Int
Return
Int ControlTemplate.TYPE_TEMPERATURE