Add entity category to hunterdouglas_powerview (#58368)
This commit is contained in:
parent
b09f6620eb
commit
a36ac11d57
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,11 @@
|
||||||
from aiopvapi.resources.shade import factory as PvShade
|
from aiopvapi.resources.shade import factory as PvShade
|
||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity
|
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 homeassistant.core import callback
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
|
@ -49,6 +53,8 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
||||||
class PowerViewShadeBatterySensor(ShadeEntity, SensorEntity):
|
class PowerViewShadeBatterySensor(ShadeEntity, SensorEntity):
|
||||||
"""Representation of an shade battery charge sensor."""
|
"""Representation of an shade battery charge sensor."""
|
||||||
|
|
||||||
|
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_unit_of_measurement(self):
|
def native_unit_of_measurement(self):
|
||||||
"""Return the unit of measurement."""
|
"""Return the unit of measurement."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue