allow knx for scripts (#22429)

This commit is contained in:
gemu 2024-11-08 16:51:39 +01:00 committed by GitHub
parent 98cf7f33f7
commit 4f90c3764a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -620,7 +620,7 @@ void KNX_INIT(void)
} }
#endif // USE_ENERGY_SENSOR #endif // USE_ENERGY_SENSOR
#ifdef USE_RULES #if defined(USE_RULES) || defined(USE_SCRIPT)
device_param[KNX_SLOT1-1].show = true; device_param[KNX_SLOT1-1].show = true;
device_param[KNX_SLOT2-1].show = true; device_param[KNX_SLOT2-1].show = true;
device_param[KNX_SLOT3-1].show = true; device_param[KNX_SLOT3-1].show = true;
@ -718,7 +718,8 @@ void KNX_CB_Action(message_t const &msg, void *arg)
} }
} }
} }
#ifdef USE_RULES
#if defined(USE_RULES) || defined(USE_SCRIPT)
else if ((chan->type >= KNX_SLOT1) && (chan->type <= KNX_SLOT9)) // KNX RX SLOTs (write command) else if ((chan->type >= KNX_SLOT1) && (chan->type <= KNX_SLOT9)) // KNX RX SLOTs (write command)
{ {
if (!toggle_inhibit) { if (!toggle_inhibit) {
@ -826,7 +827,9 @@ void KNX_CB_Action(message_t const &msg, void *arg)
KNX_ANSWER_4BYTE_INT(msg.received_on, round(1000.0 * Energy->total_sum)); KNX_ANSWER_4BYTE_INT(msg.received_on, round(1000.0 * Energy->total_sum));
} }
#endif // USE_ENERGY_SENSOR #endif // USE_ENERGY_SENSOR
#ifdef USE_RULES
#if defined(USE_RULES) || defined(USE_SCRIPT)
else if ((chan->type >= KNX_SLOT1) && (chan->type <= KNX_SLOT9)) // KNX RX SLOTs (read command) else if ((chan->type >= KNX_SLOT1) && (chan->type <= KNX_SLOT9)) // KNX RX SLOTs (read command)
{ {
if (!toggle_inhibit) { if (!toggle_inhibit) {