Skip to content

Commit

Permalink
Updated home assistant module for climate
Browse files Browse the repository at this point in the history
  • Loading branch information
Julius2342 committed Dec 17, 2017
1 parent 9423eb1 commit 732ebf6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion home-assistant-plugin/custom_components/climate/xknx.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import voluptuous as vol

from custom_components.xknx import DATA_XKNX, ATTR_DISCOVER_DEVICES
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
from homeassistant.components.climate import (
PLATFORM_SCHEMA, ClimateDevice, SUPPORT_TARGET_TEMPERATURE,
SUPPORT_OPERATION_MODE)
from homeassistant.const import CONF_NAME, TEMP_CELSIUS, ATTR_TEMPERATURE
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
Expand Down Expand Up @@ -135,6 +137,14 @@ def __init__(self, hass, device):

self._unit_of_measurement = TEMP_CELSIUS

@property
def supported_features(self):
"""Return the list of supported features."""
support = SUPPORT_TARGET_TEMPERATURE
if self.device.supports_operation_mode:
support |= SUPPORT_OPERATION_MODE
return support

def async_register_callbacks(self):
"""Register callbacks to update hass after device was changed."""
@asyncio.coroutine
Expand Down

0 comments on commit 732ebf6

Please sign in to comment.