From 0ce70e48b1ed2f9a63c03a90ae836be38742e1a5 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 16 Jun 2025 23:27:37 +0200 Subject: [PATCH] avr: added type "light" --- aqhome/aqhome.c | 3 +++ aqhome/aqhome.h | 3 ++- avr/devices/all/defs.asm | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aqhome/aqhome.c b/aqhome/aqhome.c index 473444d..8987a43 100644 --- a/aqhome/aqhome.c +++ b/aqhome/aqhome.c @@ -267,6 +267,8 @@ int AQH_ValueModality_fromString(const char *s) return AQH_ValueModality_TVOC; else if (strcasecmp(s, "stats")==0) return AQH_ValueModality_Stats; + else if (strcasecmp(s, "light")==0) + return AQH_ValueModality_Light; } return AQH_ValueModality_Unknown; } @@ -285,6 +287,7 @@ const char *AQH_ValueModality_toString(int i) case AQH_ValueModality_Co2: return "co2"; case AQH_ValueModality_TVOC: return "tvoc"; case AQH_ValueModality_Stats: return "stats"; + case AQH_ValueModality_Light: return "light"; case AQH_ValueModality_Unknown: default: return "unknown"; } diff --git a/aqhome/aqhome.h b/aqhome/aqhome.h index 185ca2e..cc6a85b 100644 --- a/aqhome/aqhome.h +++ b/aqhome/aqhome.h @@ -45,7 +45,8 @@ enum { AQH_ValueModality_Motion, AQH_ValueModality_Co2, AQH_ValueModality_TVOC, - AQH_ValueModality_Stats + AQH_ValueModality_Stats, + AQH_ValueModality_Light }; diff --git a/avr/devices/all/defs.asm b/avr/devices/all/defs.asm index 181bb72..9966df5 100644 --- a/avr/devices/all/defs.asm +++ b/avr/devices/all/defs.asm @@ -20,6 +20,7 @@ .equ AQHOME_VALUETYPE_CO2 = 7 .equ AQHOME_VALUETYPE_TVOC = 8 .equ AQHOME_VALUETYPE_STATS = 9 +.equ AQHOME_VALUETYPE_LIGHT = 10 ; Value Ids