Implement percentage step sizes for fans (#46512)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
5df46b60e8
commit
f2b303d509
24 changed files with 447 additions and 3 deletions
|
@ -119,6 +119,11 @@ class EsphomeFan(EsphomeEntity, FanEntity):
|
|||
ORDERED_NAMED_FAN_SPEEDS, self._state.speed
|
||||
)
|
||||
|
||||
@property
|
||||
def speed_count(self) -> Optional[int]:
|
||||
"""Return the number of speeds the fan supports."""
|
||||
return len(ORDERED_NAMED_FAN_SPEEDS)
|
||||
|
||||
@esphome_state_property
|
||||
def oscillating(self) -> None:
|
||||
"""Return the oscillation state."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue