mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Guard against unavailable climate entities (#25978)
This commit is contained in:
parent
715bb286c4
commit
ce35f64d59
@ -264,7 +264,9 @@ class ClimateCapabilities(AlexaEntity):
|
|||||||
def interfaces(self):
|
def interfaces(self):
|
||||||
"""Yield the supported interfaces."""
|
"""Yield the supported interfaces."""
|
||||||
# If we support two modes, one being off, we allow turning on too.
|
# If we support two modes, one being off, we allow turning on too.
|
||||||
if climate.HVAC_MODE_OFF in self.entity.attributes[climate.ATTR_HVAC_MODES]:
|
if climate.HVAC_MODE_OFF in self.entity.attributes.get(
|
||||||
|
climate.ATTR_HVAC_MODES, []
|
||||||
|
):
|
||||||
yield AlexaPowerController(self.entity)
|
yield AlexaPowerController(self.entity)
|
||||||
|
|
||||||
yield AlexaThermostatController(self.hass, self.entity)
|
yield AlexaThermostatController(self.hass, self.entity)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user