Use new enums in myq (#61933)
This commit is contained in:
parent
f9a310ea49
commit
6b13dc7285
2 changed files with 7 additions and 8 deletions
|
@ -1,9 +1,9 @@
|
|||
"""Support for MyQ gateways."""
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_CONNECTIVITY,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.const import ENTITY_CATEGORY_DIAGNOSTIC
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
|
||||
from . import MyQEntity
|
||||
from .const import DOMAIN, MYQ_COORDINATOR, MYQ_GATEWAY
|
||||
|
@ -26,8 +26,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
class MyQBinarySensorEntity(MyQEntity, BinarySensorEntity):
|
||||
"""Representation of a MyQ gateway."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
|
||||
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
|
||||
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue