Use DeviceClass Enums in advantage_air tests (#61986)
This commit is contained in:
parent
1a594d2a8c
commit
4a7a3b0469
1 changed files with 2 additions and 2 deletions
|
@ -8,11 +8,11 @@ from homeassistant.components.advantage_air.const import (
|
||||||
)
|
)
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
DEVICE_CLASS_DAMPER,
|
|
||||||
DOMAIN as COVER_DOMAIN,
|
DOMAIN as COVER_DOMAIN,
|
||||||
SERVICE_CLOSE_COVER,
|
SERVICE_CLOSE_COVER,
|
||||||
SERVICE_OPEN_COVER,
|
SERVICE_OPEN_COVER,
|
||||||
SERVICE_SET_COVER_POSITION,
|
SERVICE_SET_COVER_POSITION,
|
||||||
|
CoverDeviceClass,
|
||||||
)
|
)
|
||||||
from homeassistant.const import ATTR_ENTITY_ID, STATE_OPEN
|
from homeassistant.const import ATTR_ENTITY_ID, STATE_OPEN
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
@ -49,7 +49,7 @@ async def test_cover_async_setup_entry(hass, aioclient_mock):
|
||||||
state = hass.states.get(entity_id)
|
state = hass.states.get(entity_id)
|
||||||
assert state
|
assert state
|
||||||
assert state.state == STATE_OPEN
|
assert state.state == STATE_OPEN
|
||||||
assert state.attributes.get("device_class") == DEVICE_CLASS_DAMPER
|
assert state.attributes.get("device_class") == CoverDeviceClass.DAMPER
|
||||||
assert state.attributes.get("current_position") == 100
|
assert state.attributes.get("current_position") == 100
|
||||||
|
|
||||||
entry = registry.async_get(entity_id)
|
entry = registry.async_get(entity_id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue