Add entity category to Hue (#58011)

This commit is contained in:
Paulus Schoutsen 2021-10-19 03:29:43 -07:00 committed by GitHub
parent d8a354fa8f
commit 4fe4e65e3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -11,6 +11,7 @@ from homeassistant.const import (
DEVICE_CLASS_BATTERY,
DEVICE_CLASS_ILLUMINANCE,
DEVICE_CLASS_TEMPERATURE,
ENTITY_CATEGORY_DIAGNOSTIC,
LIGHT_LUX,
PERCENTAGE,
TEMP_CELSIUS,
@ -95,6 +96,7 @@ class HueBattery(GenericHueSensor, SensorEntity):
_attr_device_class = DEVICE_CLASS_BATTERY
_attr_state_class = STATE_CLASS_MEASUREMENT
_attr_native_unit_of_measurement = PERCENTAGE
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
@property
def unique_id(self):