mirror of
https://github.com/esphome/esphome.git
synced 2026-05-30 15:28:34 +08:00
[ili9xxx][st7735] Add deprecation warnings (#15416)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
DEPRECATED_COMPONENT = """
|
||||||
|
The 'ili9xxx' component is deprecated and no new models will be added to it.
|
||||||
|
New model PRs should target the newer and more performant 'mipi_spi' component.
|
||||||
|
"""
|
||||||
|
|||||||
@@ -219,6 +219,9 @@ FINAL_VALIDATE_SCHEMA = final_validate
|
|||||||
|
|
||||||
|
|
||||||
async def to_code(config):
|
async def to_code(config):
|
||||||
|
LOGGER.warning(
|
||||||
|
"The 'ili9xxx' component is deprecated, it is recommended to use 'mipi_spi' instead."
|
||||||
|
)
|
||||||
rhs = MODELS[config[CONF_MODEL]].new()
|
rhs = MODELS[config[CONF_MODEL]].new()
|
||||||
var = cg.Pvariable(config[CONF_ID], rhs)
|
var = cg.Pvariable(config[CONF_ID], rhs)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
|
|
||||||
st7735_ns = cg.esphome_ns.namespace("st7735")
|
st7735_ns = cg.esphome_ns.namespace("st7735")
|
||||||
|
|
||||||
|
DEPRECATED_COMPONENT = """
|
||||||
|
The 'st7735' component is deprecated and no new models will be added to it.
|
||||||
|
New model PRs should target the newer and more performant 'mipi_spi' component.
|
||||||
|
"""
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import logging
|
||||||
|
|
||||||
from esphome import pins
|
from esphome import pins
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
from esphome.components import display, spi
|
from esphome.components import display, spi
|
||||||
@@ -15,6 +17,7 @@ from esphome.const import (
|
|||||||
from . import st7735_ns
|
from . import st7735_ns
|
||||||
|
|
||||||
CODEOWNERS = ["@SenexCrenshaw"]
|
CODEOWNERS = ["@SenexCrenshaw"]
|
||||||
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DEPENDENCIES = ["spi"]
|
DEPENDENCIES = ["spi"]
|
||||||
|
|
||||||
@@ -87,6 +90,9 @@ async def setup_st7735(var, config):
|
|||||||
|
|
||||||
|
|
||||||
async def to_code(config):
|
async def to_code(config):
|
||||||
|
LOGGER.warning(
|
||||||
|
"The 'st7735' component is deprecated, it is recommended to use 'mipi_spi' instead."
|
||||||
|
)
|
||||||
var = cg.new_Pvariable(
|
var = cg.new_Pvariable(
|
||||||
config[CONF_ID],
|
config[CONF_ID],
|
||||||
config[CONF_MODEL],
|
config[CONF_MODEL],
|
||||||
|
|||||||
Reference in New Issue
Block a user