mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Use enums in opengarage (#62083)
This commit is contained in:
parent
06f670272f
commit
b30dd6857f
@ -5,10 +5,10 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
DEVICE_CLASS_GARAGE,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
SUPPORT_CLOSE,
|
SUPPORT_CLOSE,
|
||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
|
CoverDeviceClass,
|
||||||
CoverEntity,
|
CoverEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -76,7 +76,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
|
|||||||
class OpenGarageCover(OpenGarageEntity, CoverEntity):
|
class OpenGarageCover(OpenGarageEntity, CoverEntity):
|
||||||
"""Representation of a OpenGarage cover."""
|
"""Representation of a OpenGarage cover."""
|
||||||
|
|
||||||
_attr_device_class = DEVICE_CLASS_GARAGE
|
_attr_device_class = CoverDeviceClass.GARAGE
|
||||||
_attr_supported_features = SUPPORT_OPEN | SUPPORT_CLOSE
|
_attr_supported_features = SUPPORT_OPEN | SUPPORT_CLOSE
|
||||||
|
|
||||||
def __init__(self, open_garage_data_coordinator, device_id):
|
def __init__(self, open_garage_data_coordinator, device_id):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user