readonly check with device_id

This commit is contained in:
MichaelDvP
2022-12-22 14:25:20 +01:00
parent 9cbb810fe4
commit d300ed38ea
4 changed files with 6 additions and 6 deletions

View File

@@ -307,7 +307,7 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char *
// check if read-only. This also checks for valid tags (e.g. heating circuits)
if (cf->cmdfunction_) {
if (EMSESP::cmd_is_readonly(device_type, cmd, id)) {
if (EMSESP::cmd_is_readonly(device_type, device_id, cmd, id)) {
return_code = CommandRet::INVALID; // readonly or invalid hc
} else {
return_code = ((cf->cmdfunction_)(value, id)) ? CommandRet::OK : CommandRet::ERROR;