[st7789v] Add deprecation warnings (#16162)

This commit is contained in:
Clyde Stubbs
2026-04-30 15:53:37 +10:00
committed by GitHub
parent 096d0c4279
commit 1398dcebb4
2 changed files with 12 additions and 0 deletions
+5
View File
@@ -1,3 +1,8 @@
import esphome.codegen as cg
st7789v_ns = cg.esphome_ns.namespace("st7789v")
DEPRECATED_COMPONENT = """
The 'st7789v' component is deprecated and no new functionality will be added to it.
PRs should target the newer and more performant 'mipi_spi' component.
"""
+7
View File
@@ -1,3 +1,5 @@
import logging
from esphome import pins
import esphome.codegen as cg
from esphome.components import display, power_supply, spi
@@ -26,6 +28,8 @@ CODEOWNERS = ["@kbx81"]
DEPENDENCIES = ["spi"]
LOGGER = logging.getLogger(__name__)
ST7789V = st7789v_ns.class_(
"ST7789V", cg.PollingComponent, spi.SPIDevice, display.DisplayBuffer
)
@@ -175,6 +179,9 @@ FINAL_VALIDATE_SCHEMA = spi.final_validate_device_schema(
async def to_code(config):
LOGGER.warning(
"The 'st7789v' component is deprecated, it is recommended to use 'mipi_spi' instead."
)
var = cg.new_Pvariable(config[CONF_ID])
await display.register_display(var, config)
await spi.register_spi_device(var, config, write_only=True)