mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 16:17:20 +00:00
Add category diagnostic to Surepetcare battery sensor (#57852)
This commit is contained in:
parent
dd2d708cb9
commit
9c3aa8156d
@ -12,6 +12,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_VOLTAGE,
|
ATTR_VOLTAGE,
|
||||||
DEVICE_CLASS_BATTERY,
|
DEVICE_CLASS_BATTERY,
|
||||||
|
ENTITY_CATEGORY_DIAGNOSTIC,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
VOLUME_MILLILITERS,
|
VOLUME_MILLILITERS,
|
||||||
)
|
)
|
||||||
@ -49,9 +50,10 @@ async def async_setup_entry(
|
|||||||
|
|
||||||
|
|
||||||
class SureBattery(SurePetcareEntity, SensorEntity):
|
class SureBattery(SurePetcareEntity, SensorEntity):
|
||||||
"""A sensor implementation for Sure Petcare Entities."""
|
"""A sensor implementation for Sure Petcare batteries."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_BATTERY
|
_attr_device_class = DEVICE_CLASS_BATTERY
|
||||||
|
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
|
||||||
_attr_native_unit_of_measurement = PERCENTAGE
|
_attr_native_unit_of_measurement = PERCENTAGE
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user