Skip to content

Commit

Permalink
Fix duplicate method
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Oct 27, 2019
1 parent 47d8f05 commit ae2357a
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions custom_components/qubino_wire_pilot/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,12 @@ def supported_features(self):
def update(self):
"""Update unit attributes."""

@property
def hvac_mode(self) -> str:
"""Return hvac operation ie. heat, cool mode.
Need to be one of HVAC_MODE_*.
"""
return HVAC_MODE_HEAT

@property
def hvac_modes(self) -> List[str]:
"""Return the list of available hvac operation modes.
Need to be a subset of HVAC_MODES.
"""
return [HVAC_MODE_HEAT, HVAC_MODE_OFF]

@property
def name(self):
"""Return the name of the climate device."""
return self._name

# Temperature
@property
def temperature_unit(self):
"""Return the unit of measurement."""
Expand All @@ -142,12 +129,6 @@ def current_temperature(self):
"""Return the sensor temperature."""
return self._cur_temperature

# Presets
@property
def preset_modes(self):
"""List of available preset modes."""
return [PRESET_COMFORT, PRESET_ECO]

@property
def heater_value(self):
state = self.hass.states.get(self.heater_entity_id)
Expand All @@ -163,6 +144,12 @@ def heater_value(self):

return brightness

# Presets
@property
def preset_modes(self):
"""List of available preset modes."""
return [PRESET_COMFORT, PRESET_ECO]

@property
def preset_mode(self):
value = self.heater_value
Expand Down

0 comments on commit ae2357a

Please sign in to comment.