# ConstraintUnit

# ConstraintUnit


```
class ConstraintUnit
```

<br />

*** ** * ** ***

Class representing a unit of measurement. It consists of a base unit and a scale, which is the multiplier on the value used to derive a value in the desired base unit. For example, if a field has the unit centi-celsius, the base unit would be Celsius and the multiplier would be 0.01.

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConstraintUnit#ConstraintUnit(com.google.home.automation.BaseUnit,kotlin.Number)(baseUnit: https://developers.home.google.com/reference/kotlin/com/google/home/automation/BaseUnit, scale: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/index.html)` Create a `ConstraintUnit` instance. |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BaseUnit` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConstraintUnit#baseUnit()` The base unit. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ConstraintUnit#scale()` The multiplier used to derive a value expressed using `baseUnit`. |

## Public constructors

### ConstraintUnit

```
ConstraintUnit(baseUnit: BaseUnit, scale: Number)
```

Create a `ConstraintUnit` instance.

## Public properties

### baseUnit

```
val baseUnit: BaseUnit
```

The base unit.

### scale

```
val scale: Number
```

The multiplier used to derive a value expressed using `baseUnit`.