Use new BinarySensorDeviceClass in keenetic_ndms2 (#61867)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-15 12:06:16 +01:00 committed by GitHub
parent d5defa8995
commit bc61c5f49e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
"""The Keenetic Client class."""
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
@ -23,7 +23,7 @@ async def async_setup_entry(
class RouterOnlineBinarySensor(BinarySensorEntity):
"""Representation router connection status."""
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
_attr_should_poll = False
def __init__(self, router: KeeneticRouter) -> None: