Closed deisi closed 7 years ago
thanks! I will test it soon with my home assistant installation and make a pull request there.
Okay, I'm also working on adding the group features there. :)
w8 before you make the pr to HA, because I just realized, it will be super handy to add an on
member function to the Group
class, because, then I can add the lightify groups with only very little code change to HA.
hmmm now I realized, when I would add everything that I need to the Group
class directly, it would end up, beeing almost identical to the Light
class....
okay, I think I made up my mined. I checked the hue implementation and there it is handled within HA itself, so I believe its best to follow this as a reference. Thus no further changes to python_lightify needed.
This commit makes sure, that only byte type objects are added with struct obj. The old try and except was failing in newer python versions.
I've tested it with python3.5 and python3.6 and it seems to work. With python2.7 it doesn't, but I think that's not a problem.