Use climate enums in venstar (#70749)

This commit is contained in:
epenet 2022-04-26 09:17:19 +02:00 committed by GitHub
parent 9009b1ef7d
commit 20f7e2f4d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 45 deletions

View file

@ -1,18 +1,14 @@
"""The climate tests for the venstar integration."""
from unittest.mock import patch
from homeassistant.components.climate.const import (
SUPPORT_FAN_MODE,
SUPPORT_PRESET_MODE,
SUPPORT_TARGET_HUMIDITY,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.components.climate.const import ClimateEntityFeature
from .util import async_init_integration, mock_venstar_devices
EXPECTED_BASE_SUPPORTED_FEATURES = (
SUPPORT_TARGET_TEMPERATURE | SUPPORT_FAN_MODE | SUPPORT_PRESET_MODE
ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.FAN_MODE
| ClimateEntityFeature.PRESET_MODE
)
@ -45,7 +41,7 @@ async def test_colortouch(hass):
"hvac_mode": 0,
"friendly_name": "COLORTOUCH",
"supported_features": EXPECTED_BASE_SUPPORTED_FEATURES
| SUPPORT_TARGET_HUMIDITY,
| ClimateEntityFeature.TARGET_HUMIDITY,
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears