krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
450 stars 47 forks source link

f-string: unmatched '(' in 5.0.3 #477

Closed HeikoTietze closed 3 months ago

HeikoTietze commented 4 months ago

After updating to 5.3.0 I get the error in

.../custom_components/merosslan/helpers/manager.py", line 395 f"{strftime("%Y-%m-%d%H-%M-%S", localtime(epoch))}_{self.config_entry_id}.csv" ^ SyntaxError: f-string: unmatched '('

Single quotes for the strftime() solve the issue.

krahabb commented 4 months ago

That makes sense...this is working anyway (in linux container) are you maybe using python on windows? or maybe a less recent python ? I'll make sure this is more robust anyway... Double checking python docs for f-strings it looks like this should be allowed in python 3.12

HeikoTietze commented 4 months ago

Python 3.11.2 on a RasPI running DietPI, which is based on Debian.

Many thanks for your work!