Use new DeviceClass and EntityCategory enums in cloud (#61332)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
8df0bc9d57
commit
c5ffeb7809
1 changed files with 4 additions and 4 deletions
|
@ -2,11 +2,11 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_CONNECTIVITY,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import ENTITY_CATEGORY_DIAGNOSTIC
|
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
|
||||||
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
|
from .const import DISPATCHER_REMOTE_UPDATE, DOMAIN
|
||||||
|
|
||||||
|
@ -26,10 +26,10 @@ class CloudRemoteBinary(BinarySensorEntity):
|
||||||
"""Representation of an Cloud Remote UI Connection binary sensor."""
|
"""Representation of an Cloud Remote UI Connection binary sensor."""
|
||||||
|
|
||||||
_attr_name = "Remote UI"
|
_attr_name = "Remote UI"
|
||||||
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
|
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
|
||||||
_attr_should_poll = False
|
_attr_should_poll = False
|
||||||
_attr_unique_id = "cloud-remote-ui-connectivity"
|
_attr_unique_id = "cloud-remote-ui-connectivity"
|
||||||
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
|
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||||
|
|
||||||
def __init__(self, cloud):
|
def __init__(self, cloud):
|
||||||
"""Initialize the binary sensor."""
|
"""Initialize the binary sensor."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue