Raise in base implementation of FanEntity.oscillate (#43354)

This commit is contained in:
Erik Montnemery 2020-11-19 12:05:52 +01:00 committed by GitHub
parent 390b45b149
commit d61998e184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -144,6 +144,7 @@ class FanEntity(ToggleEntity):
def oscillate(self, oscillating: bool) -> None:
"""Oscillate the fan."""
raise NotImplementedError()
async def async_oscillate(self, oscillating: bool):
"""Oscillate the fan."""

View file

@ -20,7 +20,8 @@ def test_fanentity():
assert fan.supported_features == 0
assert fan.capability_attributes == {}
# Test set_speed not required
fan.oscillate(True)
with pytest.raises(NotImplementedError):
fan.oscillate(True)
with pytest.raises(NotImplementedError):
fan.set_speed("slow")
with pytest.raises(NotImplementedError):