handle stats values in nodes server. added missing code.

This commit is contained in:
Martin Preuss
2025-05-28 00:44:58 +02:00
parent e40139fee2
commit d32e2f4b81
4 changed files with 52 additions and 6 deletions

View File

@@ -261,6 +261,12 @@ int AQH_ValueModality_fromString(const char *s)
return AQH_ValueModality_RGBW;
else if (strcasecmp(s, "motion")==0)
return AQH_ValueModality_Motion;
else if (strcasecmp(s, "co2")==0)
return AQH_ValueModality_Co2;
else if (strcasecmp(s, "tvoc")==0)
return AQH_ValueModality_TVOC;
else if (strcasecmp(s, "stats")==0)
return AQH_ValueModality_Stats;
}
return AQH_ValueModality_Unknown;
}
@@ -276,6 +282,9 @@ const char *AQH_ValueModality_toString(int i)
case AQH_ValueModality_RGB: return "rgb";
case AQH_ValueModality_RGBW: return "rgbw";
case AQH_ValueModality_Motion: return "motion";
case AQH_ValueModality_Co2: return "co2";
case AQH_ValueModality_TVOC: return "tvoc";
case AQH_ValueModality_Stats: return "stats";
case AQH_ValueModality_Unknown:
default: return "unknown";
}

View File

@@ -42,7 +42,10 @@ enum {
AQH_ValueModality_Door,
AQH_ValueModality_RGB,
AQH_ValueModality_RGBW,
AQH_ValueModality_Motion
AQH_ValueModality_Motion,
AQH_ValueModality_Co2,
AQH_ValueModality_TVOC,
AQH_ValueModality_Stats
};