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

Rework of converters #106

Closed
tb-killa opened this issue Oct 22, 2018 · 0 comments
Closed

Rework of converters #106

tb-killa opened this issue Oct 22, 2018 · 0 comments

Comments

@tb-killa
Copy link
Contributor

Hi @Koenkk

I´m actually thinking about reworking the converters from one devices.js file to multiple per device files.

Due to the large number of issues which are opened again and again with the same problems:

e.g. Do I have a new device, how can I integrate it ?
e.g. How can I edit the file xyz ?
e.g. Multiple Converter for other devices but somehow different.
etc.
etc.

I have considered to revise the current state of converter.

Therefore I thought about the following structure:

per device a separate file e.g. vendor_model_ownedefinition.js

content per file:
the section for fromZigbee and toZigbee as well as the actual devices part
e.g.

{
        zigbeeModel: ['lumi.sensor_switch'],
        model: 'WXKG01LM',
        vendor: 'Xiaomi',
        description: 'MiJia wireless switch',
        supports: 'single, double, triple, quadruple, many, long, long_release click',
        fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG01LM_click, fz.ignore_onoff_change, fz.ignore_basic_change],
        toZigbee: [],
    },

so we have an own exact assignment for the converters for each model.
The advantage: Dynamic editing per model as well as simple adding of own models (e.g. with HASSIO).

I can take over the revision, but I need your help regarding the exports and the associated processing.

Maybe you would be interested to do this with me soon ?

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

No branches or pull requests

1 participant