diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index ca1653037703..28863340b6bf 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -146,7 +146,7 @@ const uint8_t MAX_ROTARIES = 2; // Max number of Rotary Encoders const char MQTT_TOKEN_PREFIX[] PROGMEM = "%prefix%"; // To be substituted by mqtt_prefix[x] const char MQTT_TOKEN_TOPIC[] PROGMEM = "%topic%"; // To be substituted by mqtt_topic, mqtt_grptopic, mqtt_buttontopic, mqtt_switchtopic -const char WIFI_HOSTNAME[] = "%s-%04d"; // Expands to - +const char WIFI_HOSTNAME[] = DEFAULT_WIFI_HOSTNAME; const uint8_t CONFIG_FILE_SIGN = 0xA5; // Configuration file signature const uint8_t CONFIG_FILE_XOR = 0x5A; // Configuration file xor (0 = No Xor) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index c46d3038a9ad..6d33f53592ce 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -84,6 +84,7 @@ #define WIFI_SCAN_AT_RESTART false // [SetOption56] Scan Wi-Fi network at restart for configured AP's #define WIFI_SCAN_REGULARLY true // [SetOption57] Scan Wi-Fi network every 44 minutes for configured AP's #define WIFI_NO_SLEEP false // [SetOption127] Sets Wifi in no-sleep mode which improves responsiveness on some routers +#define DEFAULT_WIFI_HOSTNAME "%s-%04d" // Expands to - // -- Syslog -------------------------------------- #define SYS_LOG_HOST "" // [LogHost] (Linux) syslog host diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index b3a70d13e0cd..31baf060a7b5 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -23,8 +23,8 @@ #endif // ESP32_STAGE #include "include/tasmota_compat.h" #include "include/tasmota_version.h" // Tasmota version information -#include "include/tasmota.h" // Enumeration used in my_user_config.h #include "my_user_config.h" // Fixed user configurable options +#include "include/tasmota.h" // Enumeration used in my_user_config.h #ifdef USE_TLS #include // We need to include before "tasmota_globals.h" to take precedence over the BearSSL version in Arduino #endif // USE_TLS