mirror of
https://github.com/home-assistant/core
synced 2024-09-06 10:29:55 +02:00
BUGFIX: handle extra fan speeds. (#18799)
* BUGFIX: add support for extra fan speeds. * Drop extra fan speeds. Remove catch all, drop missing fan speeds. * fix self.speed_synonyms call. Remove un-needed keys() call
This commit is contained in:
parent
ab4d0a7fc3
commit
4e272624eb
@ -715,6 +715,8 @@ class FanSpeedTrait(_Trait):
|
||||
modes = self.state.attributes.get(fan.ATTR_SPEED_LIST, [])
|
||||
speeds = []
|
||||
for mode in modes:
|
||||
if mode not in self.speed_synonyms:
|
||||
continue
|
||||
speed = {
|
||||
"speed_name": mode,
|
||||
"speed_values": [{
|
||||
|
Loading…
Reference in New Issue
Block a user