mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-07-24 11:46:33 +00:00
Handle empty hassDiscovery string
This commit is contained in:
parent
e91d1e8af2
commit
fdb735b990
@ -2209,6 +2209,11 @@ void configRead()
|
||||
{
|
||||
strcpy(hassDiscovery, jsonConfigValues["hassDiscovery"]);
|
||||
}
|
||||
if (strcmp(hassDiscovery, "") == 0)
|
||||
{ // Cover off any edge case where this value winds up being empty
|
||||
debugPrintln(F("SPIFFS: [WARNING] /config.json has empty hassDiscovery value, setting to 'homeassistant'"));
|
||||
strcpy(hassDiscovery, "homeassistant");
|
||||
}
|
||||
if (!jsonConfigValues["nextionBaud"].isNull())
|
||||
{
|
||||
strcpy(nextionBaud, jsonConfigValues["nextionBaud"]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user