# Device class

> What an entity measures or is, like `temperature` or `door`. It sets the icon, the units, and how the frontend shows the entity.

Source: https://contributors.home-assistant.io/glossary/device-class/

- In code: `device_class`, `SensorDeviceClass`, `BinarySensorDeviceClass`
- Also: device classes

A binary sensor with the `door` device class shows as open and closed instead of on and off. A sensor with the `temperature` device class gets the right icon and converts to the unit the user picked.

## Related terms

- [Entity](https://contributors.home-assistant.io/glossary/entity/): One thing Home Assistant can show, measure, or control, like a light, a temperature sensor, or a switch. Every entity has a state.
- [State class](https://contributors.home-assistant.io/glossary/state-class/): How the value of a sensor behaves, like `measurement` or `total_increasing`, so Home Assistant can keep long-term statistics for it.
