From 8f2bd23dc5f8f38b0af2205401d794b2e9823e11 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 15 Sep 2025 18:06:33 +0200 Subject: [PATCH] added modality "onOff". --- aqhome/aqhome.c | 3 +++ aqhome/aqhome.h | 3 ++- avr/defs_all.asm | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/aqhome/aqhome.c b/aqhome/aqhome.c index 8987a43..568c713 100644 --- a/aqhome/aqhome.c +++ b/aqhome/aqhome.c @@ -269,6 +269,8 @@ int AQH_ValueModality_fromString(const char *s) return AQH_ValueModality_Stats; else if (strcasecmp(s, "light")==0) return AQH_ValueModality_Light; + else if (strcasecmp(s, "onOff")==0) + return AQH_ValueModality_OnOff; } return AQH_ValueModality_Unknown; } @@ -288,6 +290,7 @@ const char *AQH_ValueModality_toString(int i) case AQH_ValueModality_TVOC: return "tvoc"; case AQH_ValueModality_Stats: return "stats"; case AQH_ValueModality_Light: return "light"; + case AQH_ValueModality_OnOff: return "onOff"; case AQH_ValueModality_Unknown: default: return "unknown"; } diff --git a/aqhome/aqhome.h b/aqhome/aqhome.h index cc6a85b..786bfc7 100644 --- a/aqhome/aqhome.h +++ b/aqhome/aqhome.h @@ -46,7 +46,8 @@ enum { AQH_ValueModality_Co2, AQH_ValueModality_TVOC, AQH_ValueModality_Stats, - AQH_ValueModality_Light + AQH_ValueModality_Light, + AQH_ValueModality_OnOff }; diff --git a/avr/defs_all.asm b/avr/defs_all.asm index 317fdf7..5a574be 100644 --- a/avr/defs_all.asm +++ b/avr/defs_all.asm @@ -19,7 +19,9 @@ .equ AQHOME_VALUETYPE_MOTION = 6 .equ AQHOME_VALUETYPE_CO2 = 7 .equ AQHOME_VALUETYPE_TVOC = 8 - +.equ AQHOME_VALUETYPE_STATS = 9 +.equ AQHOME_VALUETYPE_LIGHT = 10 +.equ AQHOME_VALUETYPE_ONOFF = 11 .equ AQHOME_FW_TYPE_ATT84_BASE = 0 .equ AQHOME_FW_TYPE_ATT84_TEMP1 = 1