mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Drop single-use constants in venstar (#70765)
This commit is contained in:
parent
3440be803c
commit
09350d350d
@ -44,8 +44,6 @@ from .const import (
|
||||
DEFAULT_SSL,
|
||||
DOMAIN,
|
||||
HOLD_MODE_TEMPERATURE,
|
||||
VALID_FAN_STATES,
|
||||
VALID_THERMOSTAT_MODES,
|
||||
)
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
@ -106,7 +104,8 @@ async def async_setup_platform(
|
||||
class VenstarThermostat(VenstarEntity, ClimateEntity):
|
||||
"""Representation of a Venstar thermostat."""
|
||||
|
||||
_attr_hvac_modes = VALID_THERMOSTAT_MODES
|
||||
_attr_fan_modes = [FAN_ON, FAN_AUTO]
|
||||
_attr_hvac_modes = [HVACMode.HEAT, HVACMode.COOL, HVACMode.OFF, HVACMode.AUTO]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -156,11 +155,6 @@ class VenstarThermostat(VenstarEntity, ClimateEntity):
|
||||
return TEMP_FAHRENHEIT
|
||||
return TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def fan_modes(self):
|
||||
"""Return the list of available fan modes."""
|
||||
return VALID_FAN_STATES
|
||||
|
||||
@property
|
||||
def current_temperature(self):
|
||||
"""Return the current temperature."""
|
||||
|
@ -1,14 +1,6 @@
|
||||
"""The venstar component."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.climate.const import (
|
||||
HVAC_MODE_AUTO,
|
||||
HVAC_MODE_COOL,
|
||||
HVAC_MODE_HEAT,
|
||||
HVAC_MODE_OFF,
|
||||
)
|
||||
from homeassistant.const import STATE_ON
|
||||
|
||||
DOMAIN = "venstar"
|
||||
|
||||
ATTR_FAN_STATE = "fan_state"
|
||||
@ -18,9 +10,6 @@ CONF_HUMIDIFIER = "humidifier"
|
||||
|
||||
DEFAULT_SSL = False
|
||||
|
||||
VALID_FAN_STATES = [STATE_ON, HVAC_MODE_AUTO]
|
||||
VALID_THERMOSTAT_MODES = [HVAC_MODE_HEAT, HVAC_MODE_COOL, HVAC_MODE_OFF, HVAC_MODE_AUTO]
|
||||
|
||||
HOLD_MODE_OFF = "off"
|
||||
HOLD_MODE_TEMPERATURE = "temperature"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user