From 080c89c76188b4666cd32babe02645d08daff603 Mon Sep 17 00:00:00 2001 From: Brent Petit Date: Sun, 18 Apr 2021 15:35:03 -0500 Subject: [PATCH] Only set fan state in ecobee set_fan_mode service (#48086) --- homeassistant/components/ecobee/climate.py | 5 +---- homeassistant/components/ecobee/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/ecobee/test_climate.py | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/ecobee/climate.py b/homeassistant/components/ecobee/climate.py index 47c2ff969ec..dd29918ec18 100644 --- a/homeassistant/components/ecobee/climate.py +++ b/homeassistant/components/ecobee/climate.py @@ -644,14 +644,11 @@ class Thermostat(ClimateEntity): _LOGGER.error(error) return - cool_temp = self.thermostat["runtime"]["desiredCool"] / 10.0 - heat_temp = self.thermostat["runtime"]["desiredHeat"] / 10.0 self.data.ecobee.set_fan_mode( self.thermostat_index, fan_mode, - cool_temp, - heat_temp, self.hold_preference(), + holdHours=self.hold_hours(), ) _LOGGER.info("Setting fan mode to: %s", fan_mode) diff --git a/homeassistant/components/ecobee/manifest.json b/homeassistant/components/ecobee/manifest.json index f27cb8e425e..c1d11a8ee7b 100644 --- a/homeassistant/components/ecobee/manifest.json +++ b/homeassistant/components/ecobee/manifest.json @@ -3,7 +3,7 @@ "name": "ecobee", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/ecobee", - "requirements": ["python-ecobee-api==0.2.10"], + "requirements": ["python-ecobee-api==0.2.11"], "codeowners": ["@marthoc"], "iot_class": "cloud_polling" } diff --git a/requirements_all.txt b/requirements_all.txt index 9384eca20f2..18816b89c93 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1771,7 +1771,7 @@ python-clementine-remote==1.0.1 python-digitalocean==1.13.2 # homeassistant.components.ecobee -python-ecobee-api==0.2.10 +python-ecobee-api==0.2.11 # homeassistant.components.eq3btsmart # python-eq3bt==0.1.11 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 5746359c6ac..650655c28d7 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -962,7 +962,7 @@ pysqueezebox==0.5.5 pysyncthru==0.7.0 # homeassistant.components.ecobee -python-ecobee-api==0.2.10 +python-ecobee-api==0.2.11 # homeassistant.components.darksky python-forecastio==1.4.0 diff --git a/tests/components/ecobee/test_climate.py b/tests/components/ecobee/test_climate.py index 270c6cfec15..86f9926b756 100644 --- a/tests/components/ecobee/test_climate.py +++ b/tests/components/ecobee/test_climate.py @@ -320,7 +320,7 @@ async def test_set_fan_mode_on(thermostat, data): data.reset_mock() thermostat.set_fan_mode("on") data.ecobee.set_fan_mode.assert_has_calls( - [mock.call(1, "on", 20, 40, "nextTransition")] + [mock.call(1, "on", "nextTransition", holdHours=None)] ) @@ -329,5 +329,5 @@ async def test_set_fan_mode_auto(thermostat, data): data.reset_mock() thermostat.set_fan_mode("auto") data.ecobee.set_fan_mode.assert_has_calls( - [mock.call(1, "auto", 20, 40, "nextTransition")] + [mock.call(1, "auto", "nextTransition", holdHours=None)] )