mirror of
https://github.com/esphome/esphome.git
synced 2025-10-02 01:52:21 +01:00
[quality] Remove period from audio related Invalid raises (#10229)
This commit is contained in:
@@ -212,7 +212,7 @@ def validate_use_legacy(value):
|
||||
f"All i2s_audio components must set {CONF_USE_LEGACY} to the same value."
|
||||
)
|
||||
if (not value[CONF_USE_LEGACY]) and (CORE.using_arduino):
|
||||
raise cv.Invalid("Arduino supports only the legacy i2s driver.")
|
||||
raise cv.Invalid("Arduino supports only the legacy i2s driver")
|
||||
_use_legacy_driver = value[CONF_USE_LEGACY]
|
||||
return value
|
||||
|
||||
|
@@ -92,7 +92,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
|
||||
def _final_validate(_):
|
||||
if not use_legacy():
|
||||
raise cv.Invalid("I2S media player is only compatible with legacy i2s driver.")
|
||||
raise cv.Invalid("I2S media player is only compatible with legacy i2s driver")
|
||||
|
||||
|
||||
FINAL_VALIDATE_SCHEMA = _final_validate
|
||||
|
@@ -122,7 +122,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
|
||||
def _final_validate(config):
|
||||
if not use_legacy() and config[CONF_ADC_TYPE] == "internal":
|
||||
raise cv.Invalid("Internal ADC is only compatible with legacy i2s driver.")
|
||||
raise cv.Invalid("Internal ADC is only compatible with legacy i2s driver")
|
||||
|
||||
|
||||
FINAL_VALIDATE_SCHEMA = _final_validate
|
||||
|
@@ -163,7 +163,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
def _final_validate(config):
|
||||
if not use_legacy():
|
||||
if config[CONF_DAC_TYPE] == "internal":
|
||||
raise cv.Invalid("Internal DAC is only compatible with legacy i2s driver.")
|
||||
raise cv.Invalid("Internal DAC is only compatible with legacy i2s driver")
|
||||
if config[CONF_I2S_COMM_FMT] == "stand_max":
|
||||
raise cv.Invalid(
|
||||
"I2S standard max format only implemented with legacy i2s driver."
|
||||
|
Reference in New Issue
Block a user