Adjust root-import in google-assistant tests (#78768)
This commit is contained in:
parent
52a377ca9d
commit
7ffac12de7
2 changed files with 20 additions and 20 deletions
|
@ -9,9 +9,11 @@ from homeassistant.components import (
|
|||
binary_sensor,
|
||||
button,
|
||||
camera,
|
||||
climate,
|
||||
cover,
|
||||
fan,
|
||||
group,
|
||||
humidifier,
|
||||
input_boolean,
|
||||
input_button,
|
||||
input_select,
|
||||
|
@ -25,10 +27,8 @@ from homeassistant.components import (
|
|||
switch,
|
||||
vacuum,
|
||||
)
|
||||
from homeassistant.components.climate import const as climate
|
||||
from homeassistant.components.google_assistant import const, error, helpers, trait
|
||||
from homeassistant.components.google_assistant.error import SmartHomeError
|
||||
from homeassistant.components.humidifier import const as humidifier
|
||||
from homeassistant.components.media_player.const import (
|
||||
MEDIA_TYPE_CHANNEL,
|
||||
SERVICE_PLAY_MEDIA,
|
||||
|
@ -842,14 +842,14 @@ async def test_temperature_setting_climate_onoff(hass):
|
|||
hass,
|
||||
State(
|
||||
"climate.bla",
|
||||
climate.HVAC_MODE_AUTO,
|
||||
climate.HVACMode.AUTO,
|
||||
{
|
||||
ATTR_SUPPORTED_FEATURES: climate.SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||
climate.ATTR_HVAC_MODES: [
|
||||
climate.HVAC_MODE_OFF,
|
||||
climate.HVAC_MODE_COOL,
|
||||
climate.HVAC_MODE_HEAT,
|
||||
climate.HVAC_MODE_HEAT_COOL,
|
||||
climate.HVACMode.OFF,
|
||||
climate.HVACMode.COOL,
|
||||
climate.HVACMode.HEAT,
|
||||
climate.HVACMode.HEAT_COOL,
|
||||
],
|
||||
climate.ATTR_MIN_TEMP: None,
|
||||
climate.ATTR_MAX_TEMP: None,
|
||||
|
@ -887,7 +887,7 @@ async def test_temperature_setting_climate_no_modes(hass):
|
|||
hass,
|
||||
State(
|
||||
"climate.bla",
|
||||
climate.HVAC_MODE_AUTO,
|
||||
climate.HVACMode.AUTO,
|
||||
{
|
||||
climate.ATTR_HVAC_MODES: [],
|
||||
climate.ATTR_MIN_TEMP: None,
|
||||
|
@ -913,16 +913,16 @@ async def test_temperature_setting_climate_range(hass):
|
|||
hass,
|
||||
State(
|
||||
"climate.bla",
|
||||
climate.HVAC_MODE_AUTO,
|
||||
climate.HVACMode.AUTO,
|
||||
{
|
||||
climate.ATTR_CURRENT_TEMPERATURE: 70,
|
||||
climate.ATTR_CURRENT_HUMIDITY: 25,
|
||||
ATTR_SUPPORTED_FEATURES: climate.SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||
climate.ATTR_HVAC_MODES: [
|
||||
STATE_OFF,
|
||||
climate.HVAC_MODE_COOL,
|
||||
climate.HVAC_MODE_HEAT,
|
||||
climate.HVAC_MODE_AUTO,
|
||||
climate.HVACMode.COOL,
|
||||
climate.HVACMode.HEAT,
|
||||
climate.HVACMode.AUTO,
|
||||
],
|
||||
climate.ATTR_TARGET_TEMP_HIGH: 75,
|
||||
climate.ATTR_TARGET_TEMP_LOW: 65,
|
||||
|
@ -970,7 +970,7 @@ async def test_temperature_setting_climate_range(hass):
|
|||
assert len(calls) == 1
|
||||
assert calls[0].data == {
|
||||
ATTR_ENTITY_ID: "climate.bla",
|
||||
climate.ATTR_HVAC_MODE: climate.HVAC_MODE_COOL,
|
||||
climate.ATTR_HVAC_MODE: climate.HVACMode.COOL,
|
||||
}
|
||||
|
||||
with pytest.raises(helpers.SmartHomeError) as err:
|
||||
|
@ -995,9 +995,9 @@ async def test_temperature_setting_climate_setpoint(hass):
|
|||
hass,
|
||||
State(
|
||||
"climate.bla",
|
||||
climate.HVAC_MODE_COOL,
|
||||
climate.HVACMode.COOL,
|
||||
{
|
||||
climate.ATTR_HVAC_MODES: [STATE_OFF, climate.HVAC_MODE_COOL],
|
||||
climate.ATTR_HVAC_MODES: [STATE_OFF, climate.HVACMode.COOL],
|
||||
climate.ATTR_MIN_TEMP: 10,
|
||||
climate.ATTR_MAX_TEMP: 30,
|
||||
ATTR_TEMPERATURE: 18,
|
||||
|
@ -1050,11 +1050,11 @@ async def test_temperature_setting_climate_setpoint_auto(hass):
|
|||
hass,
|
||||
State(
|
||||
"climate.bla",
|
||||
climate.HVAC_MODE_HEAT_COOL,
|
||||
climate.HVACMode.HEAT_COOL,
|
||||
{
|
||||
climate.ATTR_HVAC_MODES: [
|
||||
climate.HVAC_MODE_OFF,
|
||||
climate.HVAC_MODE_HEAT_COOL,
|
||||
climate.HVACMode.OFF,
|
||||
climate.HVACMode.HEAT_COOL,
|
||||
],
|
||||
climate.ATTR_MIN_TEMP: 10,
|
||||
climate.ATTR_MAX_TEMP: 30,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue