mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 04:36:38 +00:00
Suppress readonly warning if obj matches with existing object
This commit is contained in:
parent
b9e0a2fb30
commit
f06912824d
@ -2197,10 +2197,12 @@ void hasp_process_obj_attribute(lv_obj_t* obj, const char* attribute, const char
|
||||
|
||||
case ATTR_OBJ:
|
||||
text = (char*)obj_get_type_name(obj);
|
||||
if(update)
|
||||
ret = HASP_ATTR_TYPE_STR_READONLY;
|
||||
if(update && strcasecmp(payload, text) == 0)
|
||||
ret = HASP_ATTR_TYPE_METHOD_OK; // Value is already correct
|
||||
else if(update)
|
||||
ret = HASP_ATTR_TYPE_STR_READONLY; // Can't change to the new value
|
||||
else
|
||||
ret = HASP_ATTR_TYPE_STR;
|
||||
ret = HASP_ATTR_TYPE_STR; // Reply the current value
|
||||
break;
|
||||
|
||||
case ATTR_MODE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user