KNX: Fix Energy Driver dependency

This commit is contained in:
Adrian Scillato 2021-09-28 15:55:38 -03:00 committed by GitHub
parent e28a3342cb
commit e49dfa7296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -644,6 +644,7 @@ void KNX_CB_Action(message_t const &msg, void *arg)
knx.answer_4byte_float(msg.received_on, last_hum);
}
}
#if defined(USE_ENERGY_SENSOR)
else if (chan->type == KNX_ENERGY_VOLTAGE) // Reply KNX_ENERGY_VOLTAGE
{
knx.answer_4byte_float(msg.received_on, Energy.voltage[0]);
@ -701,6 +702,7 @@ void KNX_CB_Action(message_t const &msg, void *arg)
knx.answer_4byte_float(msg.received_on, Energy.total);
}
}
#endif
#ifdef USE_RULES
else if ((chan->type >= KNX_SLOT1) && (chan->type <= KNX_SLOT5)) // KNX RX SLOTs (read command)
{