diff --git a/homeassistant/components/spider/climate.py b/homeassistant/components/spider/climate.py index 52146518ee3..fbae603a239 100644 --- a/homeassistant/components/spider/climate.py +++ b/homeassistant/components/spider/climate.py @@ -11,10 +11,6 @@ from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS from .const import DOMAIN -SUPPORT_FAN = ["Auto", "Low", "Medium", "High", "Boost 10", "Boost 20", "Boost 30"] - -SUPPORT_HVAC = [HVAC_MODE_HEAT, HVAC_MODE_COOL] - HA_STATE_TO_SPIDER = { HVAC_MODE_COOL: "Cool", HVAC_MODE_HEAT: "Heat", @@ -43,6 +39,11 @@ class SpiderThermostat(ClimateEntity): """Initialize the thermostat.""" self.api = api self.thermostat = thermostat + self.support_fan = thermostat.fan_speed_values + self.support_hvac = [] + for operation_value in thermostat.operation_values: + if operation_value in SPIDER_STATE_TO_HA: + self.support_hvac.append(SPIDER_STATE_TO_HA[operation_value]) @property def device_info(self): @@ -109,7 +110,7 @@ class SpiderThermostat(ClimateEntity): @property def hvac_modes(self): """Return the list of available operation modes.""" - return SUPPORT_HVAC + return self.support_hvac def set_temperature(self, **kwargs): """Set new target temperature.""" @@ -134,7 +135,7 @@ class SpiderThermostat(ClimateEntity): @property def fan_modes(self): """List of available fan modes.""" - return SUPPORT_FAN + return self.support_fan def update(self): """Get the latest data.""" diff --git a/homeassistant/components/spider/manifest.json b/homeassistant/components/spider/manifest.json index d25d2c97901..b80fa0926cd 100644 --- a/homeassistant/components/spider/manifest.json +++ b/homeassistant/components/spider/manifest.json @@ -2,8 +2,8 @@ "domain": "spider", "name": "Itho Daalderop Spider", "documentation": "https://www.home-assistant.io/integrations/spider", - "requirements": ["spiderpy==1.4.3"], + "requirements": ["spiderpy==1.6.1"], "codeowners": ["@peternijssen"], "config_flow": true, "iot_class": "cloud_polling" -} +} \ No newline at end of file diff --git a/requirements_all.txt b/requirements_all.txt index 54555279d2f..125337ccf19 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2205,7 +2205,7 @@ speak2mary==1.4.0 speedtest-cli==2.1.3 # homeassistant.components.spider -spiderpy==1.4.3 +spiderpy==1.6.1 # homeassistant.components.spotify spotipy==2.18.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 215ed38842d..13ddf117d4f 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1281,7 +1281,7 @@ speak2mary==1.4.0 speedtest-cli==2.1.3 # homeassistant.components.spider -spiderpy==1.4.3 +spiderpy==1.6.1 # homeassistant.components.spotify spotipy==2.18.0