mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 18:26:30 +00:00
Add ValidTemplate function
This commit is contained in:
parent
49d3b7dd98
commit
d8d9e334f6
@ -1132,6 +1132,16 @@ bool ValidModule(uint32_t index)
|
|||||||
return ValidTemplateModule(index);
|
return ValidTemplateModule(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ValidTemplate(const char *search) {
|
||||||
|
char template_name[strlen(SettingsText(SET_TEMPLATE_NAME)) +1];
|
||||||
|
char search_name[strlen(search) +1];
|
||||||
|
|
||||||
|
LowerCase(template_name, SettingsText(SET_TEMPLATE_NAME));
|
||||||
|
LowerCase(search_name, search);
|
||||||
|
|
||||||
|
return (strstr(template_name, search_name) != nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
String AnyModuleName(uint32_t index)
|
String AnyModuleName(uint32_t index)
|
||||||
{
|
{
|
||||||
if (USER_MODULE == index) {
|
if (USER_MODULE == index) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user