mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Return fan_speed_list based on SUPPORT_FAN_SPEED. (#35347)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user