tfriedel / python-lightify

Python module for Osram lightify. This is a work in progress.
Apache License 2.0
18 stars 9 forks source link

Use only bytes in build commands #1

Closed deisi closed 7 years ago

deisi commented 7 years ago

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.

tfriedel commented 7 years ago

thanks! I will test it soon with my home assistant installation and make a pull request there.

deisi commented 7 years ago

Okay, I'm also working on adding the group features there. :)

deisi commented 7 years ago

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.

deisi commented 7 years ago

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....

deisi commented 7 years ago

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.