Skip to content

Commit 26151a3

Browse files
committed
Fixed test failures
* custom_components/daikin_onecta/climate.py: * tests/test_init.py:
1 parent d8a0045 commit 26151a3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

custom_components/daikin_onecta/climate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ async def __set_swing(self, direction, swing_mode):
650650

651651
async def async_set_swing_mode(self, swing_mode):
652652
if self.swing_mode != swing_mode:
653-
res = self.__set_swing("vertical", swing_mode)
653+
res = await self.__set_swing("vertical", swing_mode)
654654

655655
if res is True:
656656
self._attr_swing_mode = swing_mode
@@ -666,7 +666,7 @@ async def async_set_swing_mode(self, swing_mode):
666666

667667
async def async_set_swing_horizontal_mode(self, swing_mode):
668668
if self.swing_horizontal_mode != swing_mode:
669-
res = self.__set_swing("horizontal", swing_mode)
669+
res = await self.__set_swing("horizontal", swing_mode)
670670

671671
if res is True:
672672
self._attr_swing_horizontal_mode = swing_mode

tests/test_init.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from homeassistant.components.climate import ATTR_FAN_MODE
1111
from homeassistant.components.climate import ATTR_HVAC_MODE
1212
from homeassistant.components.climate import ATTR_PRESET_MODE
13+
from homeassistant.components.climate import ATTR_SWING_HORIZONTAL_MODE
1314
from homeassistant.components.climate import ATTR_SWING_MODE
1415
from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN
1516
from homeassistant.components.climate import PRESET_AWAY
@@ -815,7 +816,7 @@ async def test_climate(
815816
await hass.services.async_call(
816817
CLIMATE_DOMAIN,
817818
SERVICE_SET_SWING_HORIZONTAL_MODE,
818-
{ATTR_ENTITY_ID: "climate.werkkamer_room_temperature", ATTR_SWING_MODE: "swing"},
819+
{ATTR_ENTITY_ID: "climate.werkkamer_room_temperature", ATTR_SWING_HORIZONTAL_MODE: "swing"},
819820
blocking=True,
820821
)
821822
await hass.async_block_till_done()

0 commit comments

Comments
 (0)