mirror of
https://github.com/esphome/esphome.git
synced 2025-09-22 21:22:22 +01:00
Warn if underscore character is used in hostname (#2079)
* Prevent underscore character being used in 'name'. * Restrict underscores in hostnames, not all names. * Use hostname validator for node name. * Allow underscore in hostname but warn once. * Add renaming instructions link to warning. * Point underscore warning to FAQ section Co-authored-by: Otto Winter <otto@otto-winter.com> Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
@@ -158,7 +158,7 @@ def valid_project_name(value: str):
|
||||
|
||||
CONFIG_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.Required(CONF_NAME): cv.valid_name,
|
||||
cv.Required(CONF_NAME): cv.hostname,
|
||||
cv.Required(CONF_PLATFORM): cv.one_of("ESP8266", "ESP32", upper=True),
|
||||
cv.Required(CONF_BOARD): validate_board,
|
||||
cv.Optional(CONF_COMMENT): cv.string,
|
||||
|
Reference in New Issue
Block a user