Use EntityCategory Enums in elkm1 (#62123)

This commit is contained in:
Dave T 2021-12-16 22:41:17 +00:00 committed by GitHub
parent 82e11aecca
commit ec4a9be4e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,9 +9,10 @@ from elkm1_lib.util import pretty_const, username
import voluptuous as vol
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import ELECTRIC_POTENTIAL_VOLT, ENTITY_CATEGORY_DIAGNOSTIC
from homeassistant.const import ELECTRIC_POTENTIAL_VOLT
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_platform
from homeassistant.helpers.entity import EntityCategory
from . import ElkAttachedEntity, create_elk_entities
from .const import ATTR_VALUE, DOMAIN, ELK_USER_CODE_SERVICE_SCHEMA
@ -158,7 +159,7 @@ class ElkKeypad(ElkSensor):
class ElkPanel(ElkSensor):
"""Representation of an Elk-M1 Panel."""
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
_attr_entity_category = EntityCategory.DIAGNOSTIC
@property
def icon(self):