Motion blinds add entity category (#62266)

This commit is contained in:
starkillerOG 2021-12-18 14:23:34 +01:00 committed by GitHub
parent e2c65a3034
commit 503a5cbd44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ from motionblinds import BlindType
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.const import PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import ATTR_AVAILABLE, DOMAIN, KEY_COORDINATOR, KEY_GATEWAY
@ -117,6 +117,7 @@ class MotionSignalStrengthSensor(CoordinatorEntity, SensorEntity):
_attr_device_class = SensorDeviceClass.SIGNAL_STRENGTH
_attr_entity_registry_enabled_default = False
_attr_native_unit_of_measurement = SIGNAL_STRENGTH_DECIBELS_MILLIWATT
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, coordinator, device, device_type):
"""Initialize the Motion Signal Strength Sensor."""