From 02c983d3329734de25028abed320ace8dc4a2bfa Mon Sep 17 00:00:00 2001 From: CQoute Date: Mon, 7 Oct 2019 06:19:31 +1030 Subject: [PATCH] Add 'flash_length' to esphome light async_turn_off (#27214) flash_length was overlooked when fixing the asyn_turn_on flash attribute. async_turn_off is now fixed with the flash attribute. --- homeassistant/components/esphome/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/esphome/light.py b/homeassistant/components/esphome/light.py index 1205521706e..334e7e645a7 100644 --- a/homeassistant/components/esphome/light.py +++ b/homeassistant/components/esphome/light.py @@ -91,7 +91,7 @@ class EsphomeLight(EsphomeEntity, Light): """Turn the entity off.""" data = {"key": self._static_info.key, "state": False} if ATTR_FLASH in kwargs: - data["flash"] = FLASH_LENGTHS[kwargs[ATTR_FLASH]] + data["flash_length"] = FLASH_LENGTHS[kwargs[ATTR_FLASH]] if ATTR_TRANSITION in kwargs: data["transition_length"] = kwargs[ATTR_TRANSITION] await self._client.light_command(**data)