1
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:
Eric Nagley 2018-11-29 16:24:53 -05:00 committed by Paulus Schoutsen
parent ab4d0a7fc3
commit 4e272624eb

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