mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Adjust root-import in demo humidifier tests (#78772)
This commit is contained in:
parent
7cfc28e915
commit
8cc0c4dbba
@ -3,13 +3,12 @@
|
|||||||
import pytest
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.humidifier.const import (
|
from homeassistant.components.humidifier import (
|
||||||
ATTR_HUMIDITY,
|
ATTR_HUMIDITY,
|
||||||
ATTR_MAX_HUMIDITY,
|
ATTR_MAX_HUMIDITY,
|
||||||
ATTR_MIN_HUMIDITY,
|
ATTR_MIN_HUMIDITY,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
MODE_AWAY,
|
MODE_AWAY,
|
||||||
MODE_ECO,
|
|
||||||
SERVICE_SET_HUMIDITY,
|
SERVICE_SET_HUMIDITY,
|
||||||
SERVICE_SET_MODE,
|
SERVICE_SET_MODE,
|
||||||
)
|
)
|
||||||
@ -106,13 +105,13 @@ async def test_set_hold_mode_eco(hass):
|
|||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_SET_MODE,
|
SERVICE_SET_MODE,
|
||||||
{ATTR_MODE: MODE_ECO, ATTR_ENTITY_ID: ENTITY_HYGROSTAT},
|
{ATTR_MODE: "eco", ATTR_ENTITY_ID: ENTITY_HYGROSTAT},
|
||||||
blocking=True,
|
blocking=True,
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
state = hass.states.get(ENTITY_HYGROSTAT)
|
state = hass.states.get(ENTITY_HYGROSTAT)
|
||||||
assert state.attributes.get(ATTR_MODE) == MODE_ECO
|
assert state.attributes.get(ATTR_MODE) == "eco"
|
||||||
|
|
||||||
|
|
||||||
async def test_turn_on(hass):
|
async def test_turn_on(hass):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user