mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Fix KeyError in comfoconnect percentage (#46654)
This commit is contained in:
parent
aaecd91407
commit
e4496ed1e3
@ -96,7 +96,7 @@ class ComfoConnectFan(FanEntity):
|
||||
@property
|
||||
def percentage(self) -> str:
|
||||
"""Return the current speed percentage."""
|
||||
speed = self._ccb.data[SENSOR_FAN_SPEED_MODE]
|
||||
speed = self._ccb.data.get(SENSOR_FAN_SPEED_MODE)
|
||||
if speed is None:
|
||||
return None
|
||||
return ranged_value_to_percentage(SPEED_RANGE, speed)
|
||||
|
Loading…
x
Reference in New Issue
Block a user