Use EntityFeature enum in components (v**) (#69465)

* Use EntityFeature enum in vallox

* Use EntityFeature enum in velbus

* Use EntityFeature enum in velux

* Use EntityFeature enum in venstar

* Use EntityFeature enum in vera

* Use EntityFeature enum in verisure

* Use EntityFeature enum in vesync

* Use EntityFeature enum in vicare

* Use EntityFeature enum in vivotek

* Use EntityFeature enum in vizio

* Use EntityFeature enum in vlc

* Use EntityFeature enum in vlc_telnet

* Use EntityFeature enum in volumio
This commit is contained in:
epenet 2022-04-07 08:42:18 +02:00 committed by GitHub
parent 10a1b1f734
commit f194f7809b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 128 additions and 186 deletions

View file

@ -10,8 +10,8 @@ from PyViCare.PyViCareUtils import (
import requests
from homeassistant.components.water_heater import (
SUPPORT_TARGET_TEMPERATURE,
WaterHeaterEntity,
WaterHeaterEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -45,8 +45,6 @@ VICARE_TEMP_WATER_MAX = 60
OPERATION_MODE_ON = "on"
OPERATION_MODE_OFF = "off"
SUPPORT_FLAGS_HEATER = SUPPORT_TARGET_TEMPERATURE
VICARE_TO_HA_HVAC_DHW = {
VICARE_MODE_DHW: OPERATION_MODE_ON,
VICARE_MODE_DHWANDHEATING: OPERATION_MODE_ON,
@ -101,6 +99,8 @@ async def async_setup_entry(
class ViCareWater(WaterHeaterEntity):
"""Representation of the ViCare domestic hot water device."""
_attr_supported_features = WaterHeaterEntityFeature.TARGET_TEMPERATURE
def __init__(self, name, api, circuit, device_config, heating_type):
"""Initialize the DHW water_heater device."""
self._name = name
@ -155,11 +155,6 @@ class ViCareWater(WaterHeaterEntity):
"configuration_url": "https://developer.viessmann.com/",
}
@property
def supported_features(self):
"""Return the list of supported features."""
return SUPPORT_FLAGS_HEATER
@property
def name(self):
"""Return the name of the water_heater device."""