Separate fan speeds into percentages and presets modes (#45407)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: John Carr <john.carr@unrouted.co.uk>
This commit is contained in:
@@ -86,7 +86,14 @@ class SmartyFan(FanEntity):
|
||||
self._speed = speed
|
||||
self._state = True
|
||||
|
||||
def turn_on(self, speed=None, **kwargs):
|
||||
#
|
||||
# The fan entity model has changed to use percentages and preset_modes
|
||||
# instead of speeds.
|
||||
#
|
||||
# Please review
|
||||
# https://developers.home-assistant.io/docs/core/entity/fan/
|
||||
#
|
||||
def turn_on(self, speed=None, percentage=None, preset_mode=None, **kwargs):
|
||||
"""Turn on the fan."""
|
||||
_LOGGER.debug("Turning on fan. Speed is %s", speed)
|
||||
if speed is None:
|
||||
|
||||
Reference in New Issue
Block a user