Use enums in updated (#62030)
This commit is contained in:
parent
633706d04a
commit
a3765b2977
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_UPDATE,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||||
|
@ -21,7 +21,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||||
class UpdaterBinary(CoordinatorEntity, BinarySensorEntity):
|
class UpdaterBinary(CoordinatorEntity, BinarySensorEntity):
|
||||||
"""Representation of an updater binary sensor."""
|
"""Representation of an updater binary sensor."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_UPDATE
|
_attr_device_class = BinarySensorDeviceClass.UPDATE
|
||||||
_attr_name = "Updater"
|
_attr_name = "Updater"
|
||||||
_attr_unique_id = "updater"
|
_attr_unique_id = "updater"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue