diff --git a/homeassistant/components/uptimerobot/binary_sensor.py b/homeassistant/components/uptimerobot/binary_sensor.py index 09ce3262d81..43aed00708d 100644 --- a/homeassistant/components/uptimerobot/binary_sensor.py +++ b/homeassistant/components/uptimerobot/binary_sensor.py @@ -2,7 +2,7 @@ from __future__ import annotations from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_CONNECTIVITY, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -27,7 +27,7 @@ async def async_setup_entry( BinarySensorEntityDescription( key=str(monitor.id), name=monitor.friendly_name, - device_class=DEVICE_CLASS_CONNECTIVITY, + device_class=BinarySensorDeviceClass.CONNECTIVITY, ), monitor=monitor, ) diff --git a/tests/components/uptimerobot/test_binary_sensor.py b/tests/components/uptimerobot/test_binary_sensor.py index 8a5c4f623e0..25ca76a2914 100644 --- a/tests/components/uptimerobot/test_binary_sensor.py +++ b/tests/components/uptimerobot/test_binary_sensor.py @@ -4,7 +4,7 @@ from unittest.mock import patch from pyuptimerobot import UptimeRobotAuthenticationException -from homeassistant.components.binary_sensor import DEVICE_CLASS_CONNECTIVITY +from homeassistant.components.binary_sensor import BinarySensorDeviceClass from homeassistant.components.uptimerobot.const import ( ATTRIBUTION, COORDINATOR_UPDATE_INTERVAL, @@ -29,7 +29,7 @@ async def test_presentation(hass: HomeAssistant) -> None: entity = hass.states.get(UPTIMEROBOT_TEST_ENTITY) assert entity.state == STATE_ON - assert entity.attributes["device_class"] == DEVICE_CLASS_CONNECTIVITY + assert entity.attributes["device_class"] == BinarySensorDeviceClass.CONNECTIVITY assert entity.attributes["attribution"] == ATTRIBUTION assert entity.attributes["target"] == MOCK_UPTIMEROBOT_MONITOR["url"]