Skip to content

Commit d61998e

Browse files
authored
Raise in base implementation of FanEntity.oscillate (home-assistant#43354)
1 parent 390b45b commit d61998e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

homeassistant/components/fan/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ async def async_turn_on(self, speed: Optional[str] = None, **kwargs):
144144

145145
def oscillate(self, oscillating: bool) -> None:
146146
"""Oscillate the fan."""
147+
raise NotImplementedError()
147148

148149
async def async_oscillate(self, oscillating: bool):
149150
"""Oscillate the fan."""

tests/components/fan/test_init.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def test_fanentity():
2020
assert fan.supported_features == 0
2121
assert fan.capability_attributes == {}
2222
# Test set_speed not required
23-
fan.oscillate(True)
23+
with pytest.raises(NotImplementedError):
24+
fan.oscillate(True)
2425
with pytest.raises(NotImplementedError):
2526
fan.set_speed("slow")
2627
with pytest.raises(NotImplementedError):

0 commit comments

Comments
 (0)