From e5a2e188817532537af15e46ff8a7ccd0f80d0b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mayoral=20Mart=C3=ADnez?= Date: Fri, 4 Oct 2019 21:07:19 +0200 Subject: [PATCH] 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 --- homeassistant/components/template/fan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/template/fan.py b/homeassistant/components/template/fan.py index 42790e618d9..606f18e5fe1 100644 --- a/homeassistant/components/template/fan.py +++ b/homeassistant/components/template/fan.py @@ -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: