Use climate enums in velbus (#70748)

pull/70764/head
epenet 2022-04-26 09:05:38 +02:00 committed by GitHub
parent fcecc38294
commit dbf567d664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -5,8 +5,8 @@ from typing import Any
from velbusaio.channels import Temperature as VelbusTemp from velbusaio.channels import Temperature as VelbusTemp
from homeassistant.components.climate import ClimateEntity, ClimateEntityFeature from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import HVAC_MODE_HEAT from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
@ -38,8 +38,8 @@ class VelbusClimate(VelbusEntity, ClimateEntity):
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
) )
_attr_temperature_unit = TEMP_CELSIUS _attr_temperature_unit = TEMP_CELSIUS
_attr_hvac_mode = HVAC_MODE_HEAT _attr_hvac_mode = HVACMode.HEAT
_attr_hvac_modes = [HVAC_MODE_HEAT] _attr_hvac_modes = [HVACMode.HEAT]
_attr_preset_modes = list(PRESET_MODES) _attr_preset_modes = list(PRESET_MODES)
@property @property