mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Return fan_speed_list based on SUPPORT_FAN_SPEED. (#35347)
This commit is contained in:
parent
53771bd576
commit
15e8f4614c
@ -249,7 +249,7 @@ class VacuumEntity(_BaseVacuum, ToggleEntity):
|
||||
@property
|
||||
def capability_attributes(self):
|
||||
"""Return capability attributes."""
|
||||
if self.fan_speed is not None:
|
||||
if self.supported_features & SUPPORT_FAN_SPEED:
|
||||
return {ATTR_FAN_SPEED_LIST: self.fan_speed_list}
|
||||
|
||||
@property
|
||||
@ -316,8 +316,7 @@ class VacuumDevice(VacuumEntity):
|
||||
"""Print deprecation warning."""
|
||||
super().__init_subclass__(**kwargs)
|
||||
_LOGGER.warning(
|
||||
"VacuumDevice is deprecated, modify %s to extend VacuumEntity",
|
||||
cls.__name__,
|
||||
"VacuumDevice is deprecated, modify %s to extend VacuumEntity", cls.__name__
|
||||
)
|
||||
|
||||
|
||||
@ -341,7 +340,7 @@ class StateVacuumEntity(_BaseVacuum):
|
||||
@property
|
||||
def capability_attributes(self):
|
||||
"""Return capability attributes."""
|
||||
if self.fan_speed is not None:
|
||||
if self.supported_features & SUPPORT_FAN_SPEED:
|
||||
return {ATTR_FAN_SPEED_LIST: self.fan_speed_list}
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user