From 5c2c8935cea3547296cdbd63819ea893092a2995 Mon Sep 17 00:00:00 2001 From: Michael Davidson Date: Tue, 19 Dec 2023 21:04:50 +1100 Subject: [PATCH] Some lint improvements --- esphome/components/graphical_layout/horizontal_stack.py | 4 ++-- esphome/components/graphical_layout/vertical_stack.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/graphical_layout/horizontal_stack.py b/esphome/components/graphical_layout/horizontal_stack.py index aa97b2531f..53a3b9e510 100644 --- a/esphome/components/graphical_layout/horizontal_stack.py +++ b/esphome/components/graphical_layout/horizontal_stack.py @@ -7,7 +7,7 @@ HorizontalStack = graphical_layout_ns.class_("HorizontalStack") CONF_ITEM_PADDING = "item_padding" CONF_TYPE = "horizontal_stack" CONF_ITEMS = "items" -CONF_ITEM_TYPE = "type" +CONF_TYPE_KEY = "type" async def config_to_layout_item(item_config, child_item_builder): @@ -17,7 +17,7 @@ async def config_to_layout_item(item_config, child_item_builder): cg.add(var.set_item_padding(item_padding_config)) for child_item_config in item_config[CONF_ITEMS]: - child_item_type = child_item_config[CONF_ITEM_TYPE] + child_item_type = child_item_config[CONF_TYPE_KEY] if child_item_type in child_item_builder: child_item_var = await child_item_builder[child_item_type]( child_item_config, child_item_builder diff --git a/esphome/components/graphical_layout/vertical_stack.py b/esphome/components/graphical_layout/vertical_stack.py index 980cf99658..a292404110 100644 --- a/esphome/components/graphical_layout/vertical_stack.py +++ b/esphome/components/graphical_layout/vertical_stack.py @@ -7,7 +7,7 @@ VerticalStack = graphical_layout_ns.class_("VerticalStack") CONF_ITEM_PADDING = "item_padding" CONF_TYPE = "vertical_stack" CONF_ITEMS = "items" -CONF_ITEM_TYPE = "type" +CONF_TYPE_KEY = "type" async def config_to_layout_item(item_config, child_item_builder): @@ -17,7 +17,7 @@ async def config_to_layout_item(item_config, child_item_builder): cg.add(var.set_item_padding(item_padding_config)) for child_item_config in item_config[CONF_ITEMS]: - child_item_type = child_item_config[CONF_ITEM_TYPE] + child_item_type = child_item_config[CONF_TYPE_KEY] if child_item_type in child_item_builder: child_item_var = await child_item_builder[child_item_type]( child_item_config, child_item_builder