philip1986 / pimatic-led-light

A template for creating plugins
http://pimatic.org/
GNU General Public License v2.0
7 stars 13 forks source link

first example for idea extended devices. #4

Closed Fjuxx closed 9 years ago

Fjuxx commented 9 years ago

This was my idea in general (not tested any code, so i probably broke the plugin with this commit ;))

But here you can see what direction i want to go.

This also seems to be the way pimatic (internally) is set up.

For example. The dimmer class is extending the class of the switch. So you do not have to implement On/Off or Toggle functions. Only 1 change state function and all of the above work as well.

Let me know what you think!

philip1986 commented 9 years ago

I've opened a new PR based on this https://github.com/philip1986/pimatic-led-light/pull/7