mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-27 04:40:39 +03:00
Enhance homeassistant discovery (V5) (#1275)
* manual re-creation of #1246 * removed non-working approach to get interval * postpone the MQTT service start until the ClassFlowControll::ReadParameter() gets called * Increase the max_uri_handlers to 35 (was 30) * removed newlines in logs * added parameter to UI * Register handler to re-start MQTT Discovery * fix param
This commit is contained in:
@@ -29,7 +29,6 @@ extern "C" {
|
||||
|
||||
static const char* TAG = "flow_controll";
|
||||
|
||||
float AutoIntervalShared = 10;
|
||||
|
||||
|
||||
std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _host){
|
||||
@@ -142,7 +141,7 @@ void ClassFlowControll::SetInitialParameter(void)
|
||||
{
|
||||
AutoStart = false;
|
||||
SetupModeActive = false;
|
||||
AutoIntervall = 10;
|
||||
AutoIntervall = 10; // Minutes
|
||||
flowdigit = NULL;
|
||||
flowanalog = NULL;
|
||||
flowpostprocessing = NULL;
|
||||
@@ -517,7 +516,11 @@ bool ClassFlowControll::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||
}
|
||||
}
|
||||
|
||||
AutoIntervalShared = AutoIntervall;
|
||||
/* Start the MQTT service */
|
||||
for (int i = 0; i < FlowControll.size(); ++i)
|
||||
if (FlowControll[i]->name().compare("ClassFlowMQTT") == 0)
|
||||
return ((ClassFlowMQTT*) (FlowControll[i]))->Start(AutoIntervall);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user