diff --git a/esphome/config_validation.py b/esphome/config_validation.py index 1e54c04fe5..9862a52c3e 100644 --- a/esphome/config_validation.py +++ b/esphome/config_validation.py @@ -40,7 +40,7 @@ ALLOW_EXTRA = vol.ALLOW_EXTRA UNDEFINED = vol.UNDEFINED RequiredFieldInvalid = vol.RequiredFieldInvalid -ALLOWED_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_' +ALLOWED_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_-' RESERVED_IDS = [ # C++ keywords http://en.cppreference.com/w/cpp/keyword diff --git a/esphome/const.py b/esphome/const.py index a3b953397a..011eab6e90 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -10,7 +10,7 @@ ESP_PLATFORM_ESP32 = 'ESP32' ESP_PLATFORM_ESP8266 = 'ESP8266' ESP_PLATFORMS = [ESP_PLATFORM_ESP32, ESP_PLATFORM_ESP8266] -ALLOWED_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_' +ALLOWED_NAME_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_-' # Lookup table from ESP32 arduino framework version to latest platformio # package with that version # See also https://github.com/platformio/platform-espressif32/releases diff --git a/esphome/dashboard/templates/index.html b/esphome/dashboard/templates/index.html index d7ba9373be..142bc2cd6f 100644 --- a/esphome/dashboard/templates/index.html +++ b/esphome/dashboard/templates/index.html @@ -359,7 +359,7 @@
Names must be all lowercase and must not contain any spaces!
Characters that are allowed are: a-z
,
- 0-9
and _
.
+ 0-9
, _
and -
.