Climate
Table of Contents
- State
- Inside temperature
- Outside temperature
- Driver temperature setting
- Passenger temperature setting
- Hvac state
- Defogging state
- Defrosting state
- Ionising state
- Defrosting temperature setting
- Hvac weekday starting times
- Rear temperature setting
- Setters
- Change starting times
- Start stop hvac
- Start stop defogging
- Start stop defrosting
- Start stop ionising
- Set temperature settings
- Getters
State
Inside temperature
Declaration
getInsideTemperature()
Discussion
The inside temperature
Example
val state:Climate.State
assertTrue(state.insideTemperature.value?.value == 19.1)
assertTrue(state.insideTemperature.value?.unit == Temperature.Unit.CELSIUS)
// Inside temperature is 19.1°C
Outside temperature
Declaration
getOutsideTemperature()
Discussion
The outside temperature
Example
val state:Climate.State
assertTrue(state.outsideTemperature.value?.value == 12.2)
assertTrue(state.outsideTemperature.value?.unit == Temperature.Unit.CELSIUS)
// Outside temperature is 12.2°C
Driver temperature setting
Declaration
getDriverTemperatureSetting()
Discussion
The driver temperature setting
Example
val state:Climate.State
assertTrue(state.driverTemperatureSetting.value?.value == 21.5)
assertTrue(state.driverTemperatureSetting.value?.unit == Temperature.Unit.CELSIUS)
// Driver temperature setting is 21.5°C
Passenger temperature setting
Declaration
getPassengerTemperatureSetting()
Discussion
The passenger temperature setting
Example
val state:Climate.State
assertTrue(state.passengerTemperatureSetting.value?.value == 21.7)
assertTrue(state.passengerTemperatureSetting.value?.unit == Temperature.Unit.CELSIUS)
// Passenger temperature setting is 21.7°C
Hvac state
Declaration
getHvacState()
Example
val state:Climate.State
assertTrue(state.hvacState.value == ActiveState.ACTIVE)
// HVAC is active
Defogging state
Declaration
getDefoggingState()
Example
val state:Climate.State
assertTrue(state.defoggingState.value == ActiveState.INACTIVE)
// Defogging is inactive
Defrosting state
Declaration
getDefrostingState()
Example
val state:Climate.State
assertTrue(state.defrostingState.value == ActiveState.INACTIVE)
// Defrosting is inactive
Ionising state
Declaration
getIonisingState()
Example
val state:Climate.State
assertTrue(state.ionisingState.value == ActiveState.INACTIVE)
// Ionising is inactive
Defrosting temperature setting
Declaration
getDefrostingTemperatureSetting()
Discussion
The defrosting temperature setting
Example
val state:Climate.State
assertTrue(state.defrostingTemperatureSetting.value?.value == 21.2)
assertTrue(state.defrostingTemperatureSetting.value?.unit == Temperature.Unit.CELSIUS)
// Defrosting temperature setting is 21.2°C
Hvac weekday starting times
Declaration
getHvacWeekdayStartingTimes()
Example
val state:Climate.State
assertTrue(state.hvacWeekdayStartingTimes[0].value?.weekday == Weekday.MONDAY)
assertTrue(state.hvacWeekdayStartingTimes[0].value?.time?.hour == 16)
assertTrue(state.hvacWeekdayStartingTimes[0].value?.time?.minute == 0)
// HVAC is started on monday at 16:00
Rear temperature setting
Declaration
getRearTemperatureSetting()
Discussion
The rear temperature
Example
val state:Climate.State
assertTrue(state.rearTemperatureSetting.value?.value == 21.6)
assertTrue(state.rearTemperatureSetting.value?.unit == Temperature.Unit.CELSIUS)
// Rear temperature setting is 21.6°C
Setters
Change starting times
Declaration
public ChangeStartingTimes(List<HvacWeekdayStartingTime> hvacWeekdayStartingTimes)
Example
val changeStartingTimes = Climate.ChangeStartingTimes(arrayListOf(
HvacWeekdayStartingTime(Weekday.MONDAY, Time(16, 0)),
HvacWeekdayStartingTime(Weekday.TUESDAY, Time(16, 0)),
HvacWeekdayStartingTime(Weekday.WEDNESDAY, Time(16, 0)),
HvacWeekdayStartingTime(Weekday.THURSDAY, Time(16, 0)),
HvacWeekdayStartingTime(Weekday.FRIDAY, Time(16, 0)),
HvacWeekdayStartingTime(Weekday.SATURDAY, Time(18, 30)),
HvacWeekdayStartingTime(Weekday.SUNDAY, Time(19, 31)),
HvacWeekdayStartingTime(Weekday.AUTOMATIC, Time(16, 0)))
)
Start stop hvac
Declaration
public StartStopHvac(ActiveState hvacState)
Example
val startStopHvac = Climate.StartStopHvac(ActiveState.ACTIVE)
Start stop defogging
Declaration
public StartStopDefogging(ActiveState defoggingState)
Example
val startStopDefogging = Climate.StartStopDefogging(ActiveState.INACTIVE)
Start stop defrosting
Declaration
public StartStopDefrosting(ActiveState defrostingState)
Example
val startStopDefrosting = Climate.StartStopDefrosting(ActiveState.INACTIVE)
Start stop ionising
Declaration
public StartStopIonising(ActiveState ionisingState)
Example
val startStopIonising = Climate.StartStopIonising(ActiveState.INACTIVE)
Set temperature settings
Declaration
public SetTemperatureSettings(@Nullable Temperature driverTemperatureSetting, @Nullable Temperature passengerTemperatureSetting, @Nullable Temperature rearTemperatureSetting)
Example
val setTemperatureSettings = Climate.SetTemperatureSettings(Temperature(21.5, Temperature.Unit.CELSIUS), Temperature(21.7, Temperature.Unit.CELSIUS), Temperature(21.6, Temperature.Unit.CELSIUS))
Getters
Get Climate property availability information
Declaration
public GetStateAvailability()
public GetStateAvailability(byte... propertyIdentifiers)
Example
// get all property availabilities
val getAvailability = GetStateAvailability()
// get insideTemperature and outsideTemperature property availabilities
val getAvailabilityProperties = GetStateAvailability(0x01, 0x02)
Get Climate properties
Declaration
public GetState()
public GetState(byte... propertyIdentifiers)
Example
// get all properties
val getState = GetState()
// get insideTemperature and outsideTemperature properties
val getStateProperties = GetState(0x01, 0x02)