diff --git a/homeassistant/components/ping/binary_sensor.py b/homeassistant/components/ping/binary_sensor.py index ea07c3123e9..0ab79a65086 100644 --- a/homeassistant/components/ping/binary_sensor.py +++ b/homeassistant/components/ping/binary_sensor.py @@ -13,8 +13,8 @@ from icmplib import NameLookupError, async_ping import voluptuous as vol from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_CONNECTIVITY, PLATFORM_SCHEMA, + BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.const import CONF_HOST, CONF_NAME, STATE_ON @@ -99,9 +99,9 @@ class PingBinarySensor(RestoreEntity, BinarySensorEntity): return self._available @property - def device_class(self) -> str: + def device_class(self) -> BinarySensorDeviceClass: """Return the class of this sensor.""" - return DEVICE_CLASS_CONNECTIVITY + return BinarySensorDeviceClass.CONNECTIVITY @property def is_on(self) -> bool: