mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 12:15:33 +01:00
Make use of constant from const.py
This commit is contained in:
parent
26169ec0ec
commit
af81251a7c
@ -1,15 +1,11 @@
|
|||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
from esphome.const import CONF_ID
|
from esphome.const import CONF_ID, CONF_WIDTH, CONF_HEIGHT, CONF_LAMBDA
|
||||||
from esphome.components.display import DisplayRef
|
from esphome.components.display import DisplayRef
|
||||||
|
|
||||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||||
DisplayRenderingPanel = graphical_layout_ns.class_("DisplayRenderingPanel")
|
DisplayRenderingPanel = graphical_layout_ns.class_("DisplayRenderingPanel")
|
||||||
|
|
||||||
CONF_TYPE = "display_rendering_panel"
|
CONF_TYPE = "display_rendering_panel"
|
||||||
CONF_HEIGHT = "height"
|
|
||||||
CONF_WIDTH = "width"
|
|
||||||
CONF_LAMBDA = "lambda"
|
|
||||||
|
|
||||||
|
|
||||||
async def config_to_layout_item(item_config, child_item_builder):
|
async def config_to_layout_item(item_config, child_item_builder):
|
||||||
var = cg.new_Pvariable(item_config[CONF_ID])
|
var = cg.new_Pvariable(item_config[CONF_ID])
|
||||||
|
Loading…
Reference in New Issue
Block a user