mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +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
|
@property
|
||||||
def percentage(self) -> str:
|
def percentage(self) -> str:
|
||||||
"""Return the current speed percentage."""
|
"""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:
|
if speed is None:
|
||||||
return None
|
return None
|
||||||
return ranged_value_to_percentage(SPEED_RANGE, speed)
|
return ranged_value_to_percentage(SPEED_RANGE, speed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user