mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Organise imports
This commit is contained in:
parent
47935655c6
commit
d3386a3e38
7 changed files with 38 additions and 41 deletions
|
@ -1,20 +1,19 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import display, font, color
|
||||
from esphome.const import (
|
||||
CONF_ID,
|
||||
CONF_DISPLAY,
|
||||
CONF_TRIGGER_ID,
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_BACKGROUND_COLOR,
|
||||
)
|
||||
from esphome import automation, core
|
||||
|
||||
import esphome.codegen as cg
|
||||
from esphome.components import color, display, font
|
||||
from esphome.components.display_menu_base import (
|
||||
DISPLAY_MENU_BASE_SCHEMA,
|
||||
DisplayMenuComponent,
|
||||
display_menu_to_code,
|
||||
)
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
CONF_BACKGROUND_COLOR,
|
||||
CONF_DISPLAY,
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_ID,
|
||||
CONF_TRIGGER_ID,
|
||||
)
|
||||
|
||||
CONF_FONT = "font"
|
||||
CONF_MENU_ITEM_VALUE = "menu_item_value"
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_ID, CONF_TYPE, CONF_BORDER
|
||||
from esphome.components import color
|
||||
from . import horizontal_stack
|
||||
from . import vertical_stack
|
||||
from . import text_panel
|
||||
from . import display_rendering_panel
|
||||
from . import fixed_dimension_panel
|
||||
from . import text_run_panel
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_BORDER, CONF_ID, CONF_TYPE
|
||||
|
||||
from . import (
|
||||
display_rendering_panel,
|
||||
fixed_dimension_panel,
|
||||
horizontal_stack,
|
||||
text_panel,
|
||||
text_run_panel,
|
||||
vertical_stack,
|
||||
)
|
||||
|
||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||
RootLayoutComponent = graphical_layout_ns.class_("RootLayoutComponent", cg.Component)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import esphome.codegen as cg
|
||||
from esphome.components.display import DisplayRef, display_ns
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_WIDTH, CONF_HEIGHT, CONF_LAMBDA
|
||||
from esphome.components.display import display_ns, DisplayRef
|
||||
from esphome.const import CONF_HEIGHT, CONF_LAMBDA, CONF_WIDTH
|
||||
|
||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||
Rect = display_ns.class_("Rect")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_TYPE, CONF_WIDTH, CONF_HEIGHT
|
||||
from esphome.const import CONF_HEIGHT, CONF_TYPE, CONF_WIDTH
|
||||
|
||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||
FixedDimensionPanel = graphical_layout_ns.class_("FixedDimensionPanel")
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import font, color, sensor, text_sensor, time
|
||||
from esphome.components import color, font, sensor, text_sensor, time
|
||||
from esphome.components.display import display_ns
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_BACKGROUND_COLOR,
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_SENSOR,
|
||||
CONF_TIME_ID,
|
||||
)
|
||||
|
||||
|
||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||
TextPanel = graphical_layout_ns.class_("TextPanel")
|
||||
TextAlign = display_ns.enum("TextAlign", is_class=True)
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
import esphome.codegen as cg
|
||||
from esphome.cpp_generator import CallExpression, MockObjClass, MockObj
|
||||
from esphome.core import ID
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import font, color, sensor, text_sensor, time
|
||||
from esphome.components import color, font, sensor, text_sensor, time
|
||||
from esphome.components.display import display_ns
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
CONF_ID,
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_BACKGROUND_COLOR,
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_ID,
|
||||
CONF_SENSOR,
|
||||
CONF_TIME_ID,
|
||||
)
|
||||
|
||||
from esphome.core import ID
|
||||
from esphome.cpp_generator import CallExpression, MockObj, MockObjClass
|
||||
|
||||
SharedPtr = cg.std_ns.class_("shared_ptr")
|
||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
from string import ascii_letters, digits
|
||||
import esphome.config_validation as cv
|
||||
|
||||
import esphome.codegen as cg
|
||||
from esphome.components import color
|
||||
from esphome.const import (
|
||||
CONF_VISIBLE,
|
||||
CONF_FOREGROUND_COLOR,
|
||||
CONF_BACKGROUND_COLOR,
|
||||
)
|
||||
from . import CONF_NEXTION_ID
|
||||
from . import Nextion
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_BACKGROUND_COLOR, CONF_FOREGROUND_COLOR, CONF_VISIBLE
|
||||
|
||||
from . import CONF_NEXTION_ID, Nextion
|
||||
|
||||
CONF_VARIABLE_NAME = "variable_name"
|
||||
CONF_COMPONENT_NAME = "component_name"
|
||||
|
|
Loading…
Reference in a new issue