Fix template fan turn_on action (#27181)
* Fix template fan turn_on action The turn_on action of a template fan should receive the 'speed' attribute in order to give the user the possibility of define the behaviour of this action as he desires Fixes #27176 * Format * Update fan.py
This commit is contained in:
parent
e27051aa61
commit
e5a2e18881
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ class TemplateFan(FanEntity):
|
||||||
# pylint: disable=arguments-differ
|
# pylint: disable=arguments-differ
|
||||||
async def async_turn_on(self, speed: str = None) -> None:
|
async def async_turn_on(self, speed: str = None) -> None:
|
||||||
"""Turn on the fan."""
|
"""Turn on the fan."""
|
||||||
await self._on_script.async_run(context=self._context)
|
await self._on_script.async_run({ATTR_SPEED: speed}, context=self._context)
|
||||||
self._state = STATE_ON
|
self._state = STATE_ON
|
||||||
|
|
||||||
if speed is not None:
|
if speed is not None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue