Add entity category to hunterdouglas_powerview ()

pull/58403/head
J. Nick Koston 2021-10-25 00:43:00 -10:00 committed by GitHub
parent b09f6620eb
commit a36ac11d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions
homeassistant/components/hunterdouglas_powerview

View File

@ -2,7 +2,11 @@
from aiopvapi.resources.shade import factory as PvShade
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE
from homeassistant.const import (
DEVICE_CLASS_BATTERY,
ENTITY_CATEGORY_DIAGNOSTIC,
PERCENTAGE,
)
from homeassistant.core import callback
from .const import (
@ -49,6 +53,8 @@ async def async_setup_entry(hass, entry, async_add_entities):
class PowerViewShadeBatterySensor(ShadeEntity, SensorEntity):
"""Representation of an shade battery charge sensor."""
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
@property
def native_unit_of_measurement(self):
"""Return the unit of measurement."""