[ili9xxx][st7735] Add deprecation warnings (#15416)

This commit is contained in:
Clyde Stubbs
2026-04-04 12:21:58 +10:00
committed by GitHub
parent 533eeabf1d
commit 7ab26a4fe0
4 changed files with 18 additions and 0 deletions
+4
View File
@@ -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.
"""
+3
View File
@@ -219,6 +219,9 @@ FINAL_VALIDATE_SCHEMA = final_validate
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()
var = cg.Pvariable(config[CONF_ID], rhs)
+5
View File
@@ -1,3 +1,8 @@
import esphome.codegen as cg
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.
"""
+6
View File
@@ -1,3 +1,5 @@
import logging
from esphome import pins
import esphome.codegen as cg
from esphome.components import display, spi
@@ -15,6 +17,7 @@ from esphome.const import (
from . import st7735_ns
CODEOWNERS = ["@SenexCrenshaw"]
LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ["spi"]
@@ -87,6 +90,9 @@ async def setup_st7735(var, 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(
config[CONF_ID],
config[CONF_MODEL],