It doesn't really affect anything other than the debug ouput looking nicer. I don't think it is possible to have 100+ dps, so the rounding shouldn't make off-by-one mismatches appear falsely as matches.
@@ -100,7 +100,7 @@ class TuyaDeviceConfig:
if d.id not in keys or not _typematch(d.type, dps[d.id]):
return 0
keys.remove(d.id)
- return (total - len(keys)) * 100 / total
+ return round((total - len(keys)) * 100 / total)
class TuyaEntityConfig: