Use connectivity device class constant in various integrations (#39972)

This commit is contained in:
springstan authored and GitHub committed 2020-09-12 13:21:57 -05:00
1 parent 6751a38b8e
commit 3d4ef8cfe1
10 files changed
+55 -28

No files matched your search

@@ -4,7 +4,11 @@ import logging
from pyuptimerobot import UptimeRobot
import voluptuous as vol
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
PLATFORM_SCHEMA,
BinarySensorEntity,
)
from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY
import homeassistant.helpers.config_validation as cv
@@ -68,7 +72,7 @@ class UptimeRobotBinarySensor(BinarySensorEntity):
@property
def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES."""
return "connectivity"
return DEVICE_CLASS_CONNECTIVITY
@property
def device_state_attributes(self):