On the ILI9xxx display's enable the psram on esp32 and allow big screen (#4551)

* enable the psram on esp32 and allow big screen

* update CODEOWNERS

* small update

* update CODEOWNERS again.

* Removed the M5STACK because it is a ESP32 device.

* i removed the wrong model

* update the error message.
This commit is contained in:
NP v/d Spek 2023-03-13 01:13:19 +01:00 committed by Jesse Hills
parent 6e8e9c2aa9
commit 4b7c233f1a
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -16,7 +16,13 @@ from esphome.const import (
) )
DEPENDENCIES = ["spi"] DEPENDENCIES = ["spi"]
AUTO_LOAD = ["psram"]
def AUTO_LOAD():
if CORE.is_esp32:
return ["psram"]
return []
CODEOWNERS = ["@nielsnl68"] CODEOWNERS = ["@nielsnl68"]
@ -60,6 +66,16 @@ def _validate(config):
raise cv.Invalid( raise cv.Invalid(
"Providing color palette images requires palette mode to be 'IMAGE_ADAPTIVE'" "Providing color palette images requires palette mode to be 'IMAGE_ADAPTIVE'"
) )
if CORE.is_esp8266 and config.get(CONF_MODEL) not in [
"M5STACK",
"TFT_2.4",
"TFT_2.4R",
"ILI9341",
"ILI9342",
]:
raise cv.Invalid(
"Provided model can't run on ESP8266. Use an ESP32 with PSRAM onboard"
)
return config return config