simplify main for vedirect
This commit is contained in:
parent
f89ccdd2ee
commit
17e564a094
@ -16,6 +16,9 @@ void MqttHandleVedirectHassClass::init()
|
||||
|
||||
void MqttHandleVedirectHassClass::loop()
|
||||
{
|
||||
if (!Configuration.get().Vedirect_Enabled) {
|
||||
return;
|
||||
}
|
||||
if (_updateForced) {
|
||||
publishConfig();
|
||||
_updateForced = false;
|
||||
|
||||
@ -182,6 +182,7 @@ void loop()
|
||||
yield();
|
||||
Hoymiles.loop();
|
||||
yield();
|
||||
// Vedirect_Enabled is unknown to lib. Therefor check has to be done here
|
||||
if (Configuration.get().Vedirect_Enabled) {
|
||||
VeDirect.loop();
|
||||
yield();
|
||||
@ -190,16 +191,12 @@ void loop()
|
||||
yield();
|
||||
MqttHandleInverter.loop();
|
||||
yield();
|
||||
if (Configuration.get().Vedirect_Enabled) {
|
||||
MqttHandleVedirect.loop();
|
||||
yield();
|
||||
}
|
||||
MqttHandleHass.loop();
|
||||
yield();
|
||||
if (Configuration.get().Vedirect_Enabled) {
|
||||
MqttHandleVedirectHass.loop();
|
||||
yield();
|
||||
}
|
||||
WebApi.loop();
|
||||
yield();
|
||||
Display.loop();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user