JohnvandeVrugt / toonapilib4domoticz

A simple toonapilib based python plugin for domoticz
MIT License
7 stars 6 forks source link

removed globals and encapsulated state #6

Closed costastf closed 5 years ago

costastf commented 5 years ago

I refactored the code a bit. This should be absolutelly equivelant but of course not being able to test it you can take that with a grain of salt. I have no clue where "Device" and "Parameters" come from but I guess that is some black magic from domoticz that I guess I don't even want to know. This PR is more like "here are some ideas to clean up the code" and not like "merge this for sure."

JohnvandeVrugt commented 5 years ago

Thanks for the effort. Your fork of the plugin however does not work within domoticz. I like the pythonizing of the statements. I will need to dig into it.

As I stated on the project home page; I'm not a python developer myself, actually I code in C++ during the day :) Again thanks for the help!

costastf commented 5 years ago

I guessed that it wouldn't seeing as I improvised it:) As I mentioned on the comments it was exactly to give ideas. If there is anything I can help with don't hesitate to ask.