HASwitchPlate / openHASP-custom-component

Home Assistant custom component for openHASP
https://www.openhasp.com
MIT License
51 stars 12 forks source link

fix: properly split jsonl upload at lineends #138

Closed akloeckner closed 3 months ago

akloeckner commented 3 months ago

fixes #136

akloeckner commented 3 months ago

123 introduced a broken behavior of uploading jsonl files, because lines would not be split at line endings anymore, but after exactly 1000 characters. See #136.

This was done in a broader context of moving file I/O into or out of the event loop. I am not sure, why the original change was introduced. So, I think, my PR might probably be a workaround rather than a comprehensive fix.

Maybe @dgomes can comment/review?

fvanroie commented 3 months ago

Thanks!

dgomes commented 3 months ago

If the problem is the one identified in #136 then yes...

Just not sure about the identified problem is the correct one :/