Skip to content

Commit f232935

Browse files
0.0.6 current as -1
to indicate non-aware state
1 parent 50fada9 commit f232935

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ homekit_characteristic_t revision = HOMEKIT_CHARACTERISTIC_(FIRMWARE_REVISIO
117117
void target_set(homekit_value_t value);
118118
homekit_characteristic_t target = HOMEKIT_CHARACTERISTIC_(TARGET_POSITION, 0, .setter=target_set);
119119
homekit_characteristic_t state = HOMEKIT_CHARACTERISTIC_(POSITION_STATE, 2);
120-
homekit_characteristic_t current = HOMEKIT_CHARACTERISTIC_(CURRENT_POSITION, 0);
120+
homekit_characteristic_t current = HOMEKIT_CHARACTERISTIC_(CURRENT_POSITION, 0, .min_value=(float[]) {-1});
121121
homekit_characteristic_t obstruction = HOMEKIT_CHARACTERISTIC_(OBSTRUCTION_DETECTED, 0);
122122

123123

@@ -347,7 +347,7 @@ void parse(int positions) {
347347
if (buff[4]==0x02) { //position answer
348348
xTaskNotifyGive( SendTask );
349349
if (buff[6]==0xff) {
350-
current.value.int_value=22; //no meaningful concept if not aware
350+
current.value.int_value=-1; //no meaningful concept if not aware
351351
aware=0;
352352
if (calibrated) SEND(close); //force a renewed awareness
353353
} else {

0 commit comments

Comments
 (0)