mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Use new BinarySensorDeviceClass in keenetic_ndms2 (#61867)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
d5defa8995
commit
bc61c5f49e
@ -1,6 +1,6 @@
|
|||||||
"""The Keenetic Client class."""
|
"""The Keenetic Client class."""
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_CONNECTIVITY,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -23,7 +23,7 @@ async def async_setup_entry(
|
|||||||
class RouterOnlineBinarySensor(BinarySensorEntity):
|
class RouterOnlineBinarySensor(BinarySensorEntity):
|
||||||
"""Representation router connection status."""
|
"""Representation router connection status."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
|
_attr_device_class = BinarySensorDeviceClass.CONNECTIVITY
|
||||||
_attr_should_poll = False
|
_attr_should_poll = False
|
||||||
|
|
||||||
def __init__(self, router: KeeneticRouter) -> None:
|
def __init__(self, router: KeeneticRouter) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user