Use EntityFeature enum in components (p**) (#69434)
This commit is contained in:
parent
b8fc399882
commit
80a857c6c2
12 changed files with 137 additions and 206 deletions
|
@ -4,7 +4,11 @@ from __future__ import annotations
|
|||
import proliphix
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity
|
||||
from homeassistant.components.climate import (
|
||||
PLATFORM_SCHEMA,
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
)
|
||||
from homeassistant.components.climate.const import (
|
||||
CURRENT_HVAC_COOL,
|
||||
CURRENT_HVAC_HEAT,
|
||||
|
@ -13,7 +17,6 @@ from homeassistant.components.climate.const import (
|
|||
HVAC_MODE_COOL,
|
||||
HVAC_MODE_HEAT,
|
||||
HVAC_MODE_OFF,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
|
@ -59,16 +62,13 @@ def setup_platform(
|
|||
class ProliphixThermostat(ClimateEntity):
|
||||
"""Representation a Proliphix thermostat."""
|
||||
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
|
||||
def __init__(self, pdp):
|
||||
"""Initialize the thermostat."""
|
||||
self._pdp = pdp
|
||||
self._name = None
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Return the list of supported features."""
|
||||
return SUPPORT_TARGET_TEMPERATURE
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""Set up polling needed for thermostat."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue