From 2604bf59ade123f939b571cab0eb94c829d97336 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sun, 18 Oct 2020 20:57:35 +0200 Subject: [PATCH] Set keyword arguments in DemoLight (#42040) I noticed that the signature was very hard to read when working on https://github.com/home-assistant/core/pull/40626. --- homeassistant/components/demo/light.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/demo/light.py b/homeassistant/components/demo/light.py index 640502584f8..3e949138b67 100644 --- a/homeassistant/components/demo/light.py +++ b/homeassistant/components/demo/light.py @@ -33,16 +33,27 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= async_add_entities( [ DemoLight( - "light_1", - "Bed Light", - False, - True, + unique_id="light_1", + name="Bed Light", + state=False, + available=True, effect_list=LIGHT_EFFECT_LIST, effect=LIGHT_EFFECT_LIST[0], ), - DemoLight("light_2", "Ceiling Lights", True, True, ct=LIGHT_TEMPS[1]), DemoLight( - "light_3", "Kitchen Lights", True, True, LIGHT_COLORS[1], LIGHT_TEMPS[0] + unique_id="light_2", + name="Ceiling Lights", + state=True, + available=True, + ct=LIGHT_TEMPS[1], + ), + DemoLight( + unique_id="light_3", + name="Kitchen Lights", + state=True, + available=True, + hs_color=LIGHT_COLORS[1], + ct=LIGHT_TEMPS[0], ), ] )