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

Button maps enhancements #3781

Merged
merged 30 commits into from Nov 30, 2020
Merged

Button maps enhancements #3781

merged 30 commits into from Nov 30, 2020

Conversation

manup
Copy link
Member

@manup manup commented Nov 30, 2020

  • Add JSON schema validation;
  • Add some meta data which is used to create the documentation of button events;
  • Replaced several magic values with constants;
  • Fix button map usage of lumi.ctrl_ln1.aq1 and lumi.ctrl_ln2.aq1;
  • Removed C++ code for lumi.sensor_switch.aq3, lumi.remote.b1acn01 and lumi.remote.b186acn01 in favor of button maps;

- Get rid of some magic numbers;
- Make Multi State Input attribute general, as the button maps already provide a filter.
Albeit the button map works a ZHASwitch is never created.
0 here means the parser automatically does the right thing for "123", "0xff", etc.
Note that hex values in the button maps must be expressed as string with 0x prefix, aka "0x0012" not "0012" or 12.
The commit  replaces a few magic values with constants.
To run the validation `ajv` is needed (should work with other validators as well.

    ajv -s button_maps.schema.json -d button_maps.json
@manup manup merged commit 09d66c3 into dresden-elektronik:master Nov 30, 2020
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

1 participant