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
pull/18208/head
Eric Nagley 2018-11-29 16:24:53 -05:00 committed by Paulus Schoutsen
parent ab4d0a7fc3
commit 4e272624eb
1 changed files with 2 additions and 0 deletions

View File

@ -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": [{