Added setDescription(const char *) method to SpanCharacteristic

This allows you to add an optional "description" to a Characteristic.  This is not the same as the name of a Service and is generally not used by the Home App.  However, it appears to be consumed by the Eve app, which can be helpful in some circumstances when developing custom characteristics.
This commit is contained in:
Gregg 2021-12-17 06:44:27 -06:00
parent 0aba248888
commit 715adf44f1
1 changed files with 6 additions and 0 deletions

View File

@ -601,6 +601,12 @@ struct SpanCharacteristic{
return(setPerms(perms&(~dPerms)));
}
SpanCharacteristic *setDescription(const char *c){
desc = (char *)realloc(desc, strlen(c) + 1);
strcpy(desc, c);
return(this);
}
};
///////////////////////////////