Simplify Alexa/Google for new climate turn_on/off (#25115)
This commit is contained in:
parent
8ec75cf883
commit
d37d1ce4ad
4 changed files with 30 additions and 37 deletions
|
@ -249,8 +249,8 @@ class ClimateCapabilities(AlexaEntity):
|
|||
def interfaces(self):
|
||||
"""Yield the supported interfaces."""
|
||||
# If we support two modes, one being off, we allow turning on too.
|
||||
if len([v for v in self.entity.attributes[climate.ATTR_HVAC_MODES]
|
||||
if v != climate.HVAC_MODE_OFF]) == 1:
|
||||
if (climate.HVAC_MODE_OFF in
|
||||
self.entity.attributes[climate.ATTR_HVAC_MODES]):
|
||||
yield AlexaPowerController(self.entity)
|
||||
|
||||
yield AlexaThermostatController(self.hass, self.entity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue