mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
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
@ -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…
x
Reference in New Issue
Block a user