thanks for this helpful module, and in particular the recent KLAP update thanks to which I can use again the L510/L530 bulbs.
I installed this module using PIP, and I am using Python 3.9.2 .
I'm getting the following kind of errors when importing modules in the api folder:
File "/usr/local/lib/python3.9/dist-packages/plugp100/api/light_device.py", line 29, in LightDevice
async def on(self) -> Try[True]:
File "/usr/lib/python3.9/typing.py", line 268, in inner
return func(*args, **kwds)
File "/usr/lib/python3.9/typing.py", line 976, in __class_getitem__
params = tuple(_type_check(p, msg) for p in params)
File "/usr/lib/python3.9/typing.py", line 976, in
params = tuple(_type_check(p, msg) for p in params)
File "/usr/lib/python3.9/typing.py", line 157, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Parameters to generic types must be types. Got True.
These are due to the Try[True] directives, as True is not a type but a bool value. I changed it locally to Try[bool] which solved the issue for me.
Hello,
thanks for this helpful module, and in particular the recent KLAP update thanks to which I can use again the L510/L530 bulbs.
I installed this module using PIP, and I am using Python 3.9.2 .
I'm getting the following kind of errors when importing modules in the api folder:
File "/usr/local/lib/python3.9/dist-packages/plugp100/api/light_device.py", line 29, in LightDevice async def on(self) -> Try[True]: File "/usr/lib/python3.9/typing.py", line 268, in inner return func(*args, **kwds) File "/usr/lib/python3.9/typing.py", line 976, in __class_getitem__ params = tuple(_type_check(p, msg) for p in params) File "/usr/lib/python3.9/typing.py", line 976, in
params = tuple(_type_check(p, msg) for p in params)
File "/usr/lib/python3.9/typing.py", line 157, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Parameters to generic types must be types. Got True.
These are due to the Try[True] directives, as True is not a type but a bool value. I changed it locally to Try[bool] which solved the issue for me.