Set device_class on temperature sensors R-Z (#52920)

This commit is contained in:
Erik Montnemery 2021-07-12 18:53:52 +02:00 committed by GitHub
parent ad0ccc1b70
commit 1a74fd7a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 123 additions and 36 deletions

View file

@ -12,6 +12,7 @@ from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import (
CONF_MAC,
CONF_NAME,
DEVICE_CLASS_TEMPERATURE,
EVENT_HOMEASSISTANT_STOP,
PERCENTAGE,
STATE_UNKNOWN,
@ -90,6 +91,7 @@ class SkybeaconHumid(SensorEntity):
class SkybeaconTemp(SensorEntity):
"""Representation of a Skybeacon temperature sensor."""
_attr_device_class = DEVICE_CLASS_TEMPERATURE
_attr_unit_of_measurement = TEMP_CELSIUS
def __init__(self, name, mon):