From c5ffeb7809bdf1393b0a98f9e8fec32fa04ff213 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 9 Dec 2021 09:40:12 +0100 Subject: [PATCH] Use new DeviceClass and EntityCategory enums in cloud (#61332) Co-authored-by: epenet --- homeassistant/components/cloud/binary_sensor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/cloud/binary_sensor.py b/homeassistant/components/cloud/binary_sensor.py index a27364c715f..b537c447120 100644 --- a/homeassistant/components/cloud/binary_sensor.py +++ b/homeassistant/components/cloud/binary_sensor.py @@ -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."""