mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 06:45:54 +00:00
Merge pull request #578 from iprak/hass-discovery-ip-change
Invoke discovery on ip change
This commit is contained in:
@ -2564,6 +2564,12 @@ int http_fn_cfg_pins(http_request_t* request) {
|
||||
// saving the configuration instead of waiting.
|
||||
//CFG_Save_SetupTimer();
|
||||
CFG_Save_IfThereArePendingChanges();
|
||||
|
||||
// Invoke Hass discovery if configuration has changed and not in safe mode.
|
||||
if (!bSafeMode && CFG_HasFlag(OBK_FLAG_AUTOMAIC_HASS_DISCOVERY)) {
|
||||
Main_ScheduleHomeAssistantDiscovery(1);
|
||||
}
|
||||
|
||||
hprintf255(request, "Pins update - %i reqs, %i changed!<br><br>", iChangedRequested, iChanged);
|
||||
}
|
||||
// strcat(outbuf,"<button type=\"button\">Click Me!</button>");
|
||||
@ -2666,6 +2672,7 @@ const char* g_obk_flagNames[] = {
|
||||
#else
|
||||
"[UART] Use alternate UART for BL0942, CSE, TuyaMCU, etc",
|
||||
#endif
|
||||
"[HASS] Invoke HomeAssistant discovery on change to ip address, configuration",
|
||||
"error",
|
||||
"error",
|
||||
"error",
|
||||
|
||||
Reference in New Issue
Block a user