1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix fan not checking supported_features (#35248)

* Fix fan not checking supported_features

* Fix pylint

* Fix test

* Code cleanup

* Fix fan demo

* Code style improvement
This commit is contained in:
Xiaonan Shen
2020-05-06 00:58:07 -07:00
committed by GitHub
parent 1c5b4dbd97
commit 2581b031d9
3 changed files with 25 additions and 17 deletions

View File

@@ -31,7 +31,7 @@ class TestFanEntity(unittest.TestCase):
assert self.fan.state == "off"
assert len(self.fan.speed_list) == 0
assert self.fan.supported_features == 0
assert {"speed_list": []} == self.fan.capability_attributes
assert self.fan.capability_attributes == {}
# Test set_speed not required
self.fan.oscillate(True)
with pytest.raises(NotImplementedError):