Some syntax error on Debian Python 3.9.2 (default, Feb 28 2021, 17:03:44)
Traceback (most recent call last):
File "/opt/scripts/elux.py", line 2, in <module>
import pyelectroluxconnect
File "/usr/local/lib/python3.9/dist-packages/pyelectroluxconnect/__init__.py", line 11, in <module>
from .Session import (
File "/usr/local/lib/python3.9/dist-packages/pyelectroluxconnect/Session.py", line 313
match attr:
^
SyntaxError: invalid syntax
Works ok when removing the section
result = {}
for attr in ["group", "brand", "model_name"]:
if attr in _json and _json[attr] != "":
result["model" if attr == "model_name" else attr] = _json[attr]
# else:
# match attr:
# case "group":
# result["group"] = ""
# case "brand":
# result["brand"] = "Electrolux"
# case "model_name":
# result["model"] = self._findModel(pnc, elc)[0]
return result
Some syntax error on Debian Python 3.9.2 (default, Feb 28 2021, 17:03:44)
Works ok when removing the section