Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new enums in temper #62428

Merged
merged 1 commit into from Dec 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions homeassistant/components/temper/sensor.py
Expand Up @@ -4,11 +4,14 @@
from temperusb.temper import TemperHandler
import voluptuous as vol

from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.components.sensor import (
PLATFORM_SCHEMA,
SensorDeviceClass,
SensorEntity,
)
from homeassistant.const import (
CONF_NAME,
CONF_OFFSET,
DEVICE_CLASS_TEMPERATURE,
DEVICE_DEFAULT_NAME,
TEMP_CELSIUS,
)
Expand Down Expand Up @@ -60,7 +63,7 @@ def reset_devices():
class TemperSensor(SensorEntity):
"""Representation of a Temper temperature sensor."""

_attr_device_class = DEVICE_CLASS_TEMPERATURE
_attr_device_class = SensorDeviceClass.TEMPERATURE
_attr_native_unit_of_measurement = TEMP_CELSIUS

def __init__(self, temper_device, name, scaling):
Expand Down