mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-07-27 21:26:42 +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"]);
|
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())
|
if (!jsonConfigValues["nextionBaud"].isNull())
|
||||||
{
|
{
|
||||||
strcpy(nextionBaud, jsonConfigValues["nextionBaud"]);
|
strcpy(nextionBaud, jsonConfigValues["nextionBaud"]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user