mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove use of deprecated set_aux_heat call from climate _async_reproduce_states (#121873)
This commit is contained in:
parent
e2c6b7915e
commit
ba5e3ca44b
@ -10,7 +10,6 @@ from homeassistant.const import ATTR_TEMPERATURE
|
|||||||
from homeassistant.core import Context, HomeAssistant, State
|
from homeassistant.core import Context, HomeAssistant, State
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
ATTR_AUX_HEAT,
|
|
||||||
ATTR_FAN_MODE,
|
ATTR_FAN_MODE,
|
||||||
ATTR_HUMIDITY,
|
ATTR_HUMIDITY,
|
||||||
ATTR_HVAC_MODE,
|
ATTR_HVAC_MODE,
|
||||||
@ -20,7 +19,6 @@ from .const import (
|
|||||||
ATTR_TARGET_TEMP_LOW,
|
ATTR_TARGET_TEMP_LOW,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
HVAC_MODES,
|
HVAC_MODES,
|
||||||
SERVICE_SET_AUX_HEAT,
|
|
||||||
SERVICE_SET_FAN_MODE,
|
SERVICE_SET_FAN_MODE,
|
||||||
SERVICE_SET_HUMIDITY,
|
SERVICE_SET_HUMIDITY,
|
||||||
SERVICE_SET_HVAC_MODE,
|
SERVICE_SET_HVAC_MODE,
|
||||||
@ -56,9 +54,6 @@ async def _async_reproduce_states(
|
|||||||
if state.state in HVAC_MODES:
|
if state.state in HVAC_MODES:
|
||||||
await call_service(SERVICE_SET_HVAC_MODE, [], {ATTR_HVAC_MODE: state.state})
|
await call_service(SERVICE_SET_HVAC_MODE, [], {ATTR_HVAC_MODE: state.state})
|
||||||
|
|
||||||
if ATTR_AUX_HEAT in state.attributes:
|
|
||||||
await call_service(SERVICE_SET_AUX_HEAT, [ATTR_AUX_HEAT])
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(ATTR_TEMPERATURE in state.attributes)
|
(ATTR_TEMPERATURE in state.attributes)
|
||||||
or (ATTR_TARGET_TEMP_HIGH in state.attributes)
|
or (ATTR_TARGET_TEMP_HIGH in state.attributes)
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components.climate import (
|
from homeassistant.components.climate import (
|
||||||
ATTR_AUX_HEAT,
|
|
||||||
ATTR_FAN_MODE,
|
ATTR_FAN_MODE,
|
||||||
ATTR_HUMIDITY,
|
ATTR_HUMIDITY,
|
||||||
ATTR_PRESET_MODE,
|
ATTR_PRESET_MODE,
|
||||||
@ -11,7 +10,6 @@ from homeassistant.components.climate import (
|
|||||||
ATTR_TARGET_TEMP_HIGH,
|
ATTR_TARGET_TEMP_HIGH,
|
||||||
ATTR_TARGET_TEMP_LOW,
|
ATTR_TARGET_TEMP_LOW,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_SET_AUX_HEAT,
|
|
||||||
SERVICE_SET_FAN_MODE,
|
SERVICE_SET_FAN_MODE,
|
||||||
SERVICE_SET_HUMIDITY,
|
SERVICE_SET_HUMIDITY,
|
||||||
SERVICE_SET_HVAC_MODE,
|
SERVICE_SET_HVAC_MODE,
|
||||||
@ -96,7 +94,6 @@ async def test_state_with_context(hass: HomeAssistant) -> None:
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("service", "attribute"),
|
("service", "attribute"),
|
||||||
[
|
[
|
||||||
(SERVICE_SET_AUX_HEAT, ATTR_AUX_HEAT),
|
|
||||||
(SERVICE_SET_PRESET_MODE, ATTR_PRESET_MODE),
|
(SERVICE_SET_PRESET_MODE, ATTR_PRESET_MODE),
|
||||||
(SERVICE_SET_SWING_MODE, ATTR_SWING_MODE),
|
(SERVICE_SET_SWING_MODE, ATTR_SWING_MODE),
|
||||||
(SERVICE_SET_FAN_MODE, ATTR_FAN_MODE),
|
(SERVICE_SET_FAN_MODE, ATTR_FAN_MODE),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user