mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-02 12:07:02 +00:00
check fetch length for custom entities, dev17
This commit is contained in:
@@ -686,7 +686,7 @@ void WebCustomEntityService::fetch() {
|
||||
uint8_t stop = (entity.offset + len[entity.value_type]) % fetchblock;
|
||||
bool is_fetched = start < fetchblock && stop < fetchblock; // make sure the complete value is a a fetched block
|
||||
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||
if (emsdevice->is_device_id(entity.device_id) && emsdevice->is_fetch(entity.type_id)
|
||||
if (emsdevice->is_device_id(entity.device_id) && emsdevice->is_fetch(entity.type_id, entity.offset + len[entity.value_type])
|
||||
&& (is_fetched || entity.value_type == DeviceValueType::STRING)) {
|
||||
needFetch = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user