diff --git a/homeassistant/components/fan/__init__.py b/homeassistant/components/fan/__init__.py index 789299bd1ac..90a3d030703 100644 --- a/homeassistant/components/fan/__init__.py +++ b/homeassistant/components/fan/__init__.py @@ -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.""" diff --git a/tests/components/fan/test_init.py b/tests/components/fan/test_init.py index c481e9f0937..a8beed73a07 100644 --- a/tests/components/fan/test_init.py +++ b/tests/components/fan/test_init.py @@ -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):