This commit is contained in:
Tester23 2025-10-02 17:50:29 +02:00
parent f46a74b843
commit d039226ded

View File

@ -1120,10 +1120,6 @@ void TuyaMCU_ForcePublishChannelValues() {
void TuyaMCU_ApplyMapping(tuyaMCUMapping_t* mapping, int dpID, int value) {
int mappedValue = value;
if (mapping->obkFlags & OBKTM_FLAG_NOREAD) {
// ignore
return;
}
// hardcoded values
#if ENABLE_LED_BASIC
if (dpID == g_tuyaMCUled_id_power) {
@ -1146,6 +1142,10 @@ void TuyaMCU_ApplyMapping(tuyaMCUMapping_t* mapping, int dpID, int value) {
if (mapping->channel < 0) {
return;
}
if (mapping->obkFlags & OBKTM_FLAG_NOREAD) {
// ignore
return;
}
// map value depending on channel type
switch (CHANNEL_GetType(mapping->channel))