Use new DeviceClass and EntityCategory enums in cloud (#61332)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-09 09:40:12 +01:00 committed by GitHub
parent 8df0bc9d57
commit c5ffeb7809
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,11 +2,11 @@
import asyncio
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.const import ENTITY_CATEGORY_DIAGNOSTIC
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import EntityCategory
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
@ -26,10 +26,10 @@ class CloudRemoteBinary(BinarySensorEntity):
"""Representation of an Cloud Remote UI Connection binary sensor."""
_attr_name = "Remote UI"
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
_attr_should_poll = False
_attr_unique_id = "cloud-remote-ui-connectivity"
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
_attr_entity_category = EntityCategory.DIAGNOSTIC
def __init__(self, cloud):
"""Initialize the binary sensor."""