Use EntityFeature enum in components (m**) (#69414)
* Use EntityFeature in melcloud * Use EntityFeature in mystrom * Use EntityFeature in mysensors * Use EntityFeature in myq * Use EntityFeature in mpd * Use EntityFeature in monoprice * Use EntityFeature in moehlenhoff_alpha2 * Use EntityFeature in modern_forms * Use EntityFeature in modbus * Use EntityFeature in melissa * Use EntityFeature in mediaroom * Use EntityFeature in maxcube * Use EntityFeature in manual_mqtt * Fix maxcube tests * Revert "Use EntityFeature in modbus" This reverts commit56cf9d900d
. * Revert "Use EntityFeature in myq" This reverts commit44a31b1a03
. * Revert "Use EntityFeature in mystrom" This reverts commit7260ee0384
. * Revert "Revert "Use EntityFeature in modbus"" This reverts commit916a612a60
. * Revert "Revert "Use EntityFeature in myq"" This reverts commita6be42fa17
.
This commit is contained in:
parent
8e090a8c04
commit
5e2cc2b9b0
15 changed files with 109 additions and 160 deletions
|
@ -14,7 +14,7 @@ from pymelcloud.atw_device import (
|
|||
)
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.climate import ClimateEntity
|
||||
from homeassistant.components.climate import ClimateEntity, ClimateEntityFeature
|
||||
from homeassistant.components.climate.const import (
|
||||
ATTR_HVAC_MODE,
|
||||
DEFAULT_MAX_TEMP,
|
||||
|
@ -25,9 +25,6 @@ from homeassistant.components.climate.const import (
|
|||
HVAC_MODE_HEAT,
|
||||
HVAC_MODE_HEAT_COOL,
|
||||
HVAC_MODE_OFF,
|
||||
SUPPORT_FAN_MODE,
|
||||
SUPPORT_SWING_MODE,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
|
||||
|
@ -128,7 +125,9 @@ class AtaDeviceClimate(MelCloudClimate):
|
|||
"""Air-to-Air climate device."""
|
||||
|
||||
_attr_supported_features = (
|
||||
SUPPORT_FAN_MODE | SUPPORT_TARGET_TEMPERATURE | SUPPORT_SWING_MODE
|
||||
ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.SWING_MODE
|
||||
)
|
||||
|
||||
def __init__(self, device: MelCloudDevice, ata_device: AtaDevice) -> None:
|
||||
|
@ -296,7 +295,7 @@ class AtwDeviceZoneClimate(MelCloudClimate):
|
|||
|
||||
_attr_max_temp = 30
|
||||
_attr_min_temp = 10
|
||||
_attr_supported_features = SUPPORT_TARGET_TEMPERATURE
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
|
||||
def __init__(
|
||||
self, device: MelCloudDevice, atw_device: AtwDevice, atw_zone: Zone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue