Use new enums in myq (#61933)

This commit is contained in:
epenet 2021-12-15 20:44:27 +01:00 committed by GitHub
parent f9a310ea49
commit 6b13dc7285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View file

@ -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):