Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first example for idea extended devices. #4

Closed
wants to merge 1 commit into from
Closed

first example for idea extended devices. #4

wants to merge 1 commit into from

Conversation

Fjuxx
Copy link
Contributor

@Fjuxx Fjuxx commented Apr 25, 2015

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!

@@ -17,9 +17,9 @@ module.exports = (env) ->
init: (app, @framework, @config) =>
deviceConfigDef = require("./led-light-schema")

@framework.deviceManager.registerDeviceClass "LedLight",
@framework.deviceManager.registerDeviceClass "IWYLed",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MilightLed should be also attached to the framework here!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But please Note. I just made this for The general idea. So i probably broke almost erything with this pull ;)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I aware that this is a blueprint. I just wanted to prof that I got it right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea you got it right ;)

So only The plugin itself is seperate. All of The action providers ect. And The gui is shared

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I like this idea.

@philip1986
Copy link
Owner

I've opened a new PR based on this #7

@philip1986 philip1986 closed this May 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants