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