It seems that associated sensors in table “sensors” are not always deleted when you delete device from REST-API (but device is deleted in “devices” table)
Then when re-adding device later it sometimes comes with old sensors that perhaps didn’t exist anymore (after modifiying DFF for instance).
This can be seen by executing “SELECT COUNT(SUBSTR(uniqueid,1,23)) from sensors WHERE not exists (select null from devices where mac = SUBSTR(uniqueid,1,23))” after deleting a device. This command does return lines of sensors without devices.