diff --git a/esphome/components/st7789v/__init__.py b/esphome/components/st7789v/__init__.py index 3e64d09c57..7915cf119c 100644 --- a/esphome/components/st7789v/__init__.py +++ b/esphome/components/st7789v/__init__.py @@ -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. +""" diff --git a/esphome/components/st7789v/display.py b/esphome/components/st7789v/display.py index 745c37f47d..3b4d6d99ea 100644 --- a/esphome/components/st7789v/display.py +++ b/esphome/components/st7789v/display.py @@ -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)