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
pull/27216/head
Sergio Mayoral Martínez 2019-10-04 21:07:19 +02:00 committed by Paulus Schoutsen
parent e27051aa61
commit e5a2e18881
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class TemplateFan(FanEntity):
# pylint: disable=arguments-differ
async def async_turn_on(self, speed: str = None) -> None:
"""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
if speed is not None: