Allow alexa to simply turn on and off climate components. (#16989)

This commit is contained in:
Matthew Parlane 2018-11-07 02:17:56 +13:00 committed by Paulus Schoutsen
parent 58c77e1f55
commit 7933bd7f91

View File

@ -717,6 +717,9 @@ class _ClimateCapabilities(_AlexaEntity):
return [_DisplayCategory.THERMOSTAT] return [_DisplayCategory.THERMOSTAT]
def interfaces(self): def interfaces(self):
supported = self.entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
if supported & climate.SUPPORT_ON_OFF:
yield _AlexaPowerController(self.entity)
yield _AlexaThermostatController(self.hass, self.entity) yield _AlexaThermostatController(self.hass, self.entity)
yield _AlexaTemperatureSensor(self.hass, self.entity) yield _AlexaTemperatureSensor(self.hass, self.entity)