# CarClimate

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/hardware/climate/CarClimate.java+class:androidx.car.app.hardware.climate.CarClimate) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

*** ** * ** ***


```
@RequiresCarApi(value = 5)
@MainThread
public interface CarClimate
```

<br />

*** ** * ** ***

Manages access to car climate system such as cabin temperatures, fan speeds and fan directions.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimate#fetchClimateProfile(java.util.concurrent.Executor,androidx.car.app.hardware.climate.ClimateProfileRequest,androidx.car.app.hardware.climate.CarClimateProfileCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateProfileRequest request, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimateProfileCallback callback )` Fetches the climate profile information of the associated features specified in the request, for example, HVAC features like Fan Speed, Cabin Temperature, etc. |
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimate#registerClimateStateCallback(java.util.concurrent.Executor,androidx.car.app.hardware.climate.RegisterClimateStateRequest,androidx.car.app.hardware.climate.CarClimateStateCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/RegisterClimateStateRequest request, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimateStateCallback callback )` Registers an ongoing listener to receive car climate state events from the car hardware such as when the driver side temperature is increased/decreased. |
| `abstract void` | `<E> https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimate#setClimateState(java.util.concurrent.Executor,androidx.car.app.hardware.climate.ClimateStateRequest<E>,androidx.car.app.hardware.common.CarSetOperationStatusCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest<E> request, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarSetOperationStatusCallback callback )` Sets values for the car climate system. |
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimate#unregisterClimateStateCallback(androidx.car.app.hardware.climate.CarClimateStateCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimateStateCallback callback )` Unregisters the ongoing listener for receiving car climate state events. |

## Public methods

### fetchClimateProfile

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
abstract void fetchClimateProfile(
    @NonNull Executor executor,
    @NonNull ClimateProfileRequest request,
    @NonNull CarClimateProfileCallback callback
)
```

Fetches the climate profile information of the associated features specified in the request, for example, HVAC features like Fan Speed, Cabin Temperature, etc.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | the executor which will be used for invoking the listener |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateProfileRequest request` | the ClimateProfileRequest indicates profile features which the caller is interested in |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimateProfileCallback callback` | the CarClimateProfileCallback that will be invoked when the data is available |

### registerClimateStateCallback

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
abstract void registerClimateStateCallback(
    @NonNull Executor executor,
    @NonNull RegisterClimateStateRequest request,
    @NonNull CarClimateStateCallback callback
)
```

Registers an ongoing listener to receive car climate state events from the car hardware such as when the driver side temperature is increased/decreased.

If the callback was registered previously then it won't be registered again.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | the executor which will be used for invoking the listener |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/RegisterClimateStateRequest request` | the RegisterClimateStateRequest indicates climate features which the caller is interested in |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimateStateCallback callback` | the CarClimateStateCallback that will be invoked when the car climate is changed |

### setClimateState

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
abstract void <E> setClimateState(
    @NonNull Executor executor,
    @NonNull ClimateStateRequest<E> request,
    @NonNull CarSetOperationStatusCallback callback
)
```

Sets values for the car climate system.

| Parameters |
|---|---|
| `<E>` | the data type for ClimateStateRequest |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/concurrent/Executor.html executor` | the executor which will be used for invoking the listener |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/ClimateStateRequest<E> request` | the ClimateStateRequest indicates climate features which the caller is setting value for |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarSetOperationStatusCallback callback` | the CarSetOperationStatusCallback that will be invoked when the set operation succeeded or failed |

### unregisterClimateStateCallback

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
abstract void unregisterClimateStateCallback(
    @NonNull CarClimateStateCallback callback
)
```

Unregisters the ongoing listener for receiving car climate state events.

If the callback is not currently registered, then this method call has no impact.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/climate/CarClimateStateCallback callback` | the callback to unregister |