netdaemon icon indicating copy to clipboard operation
netdaemon copied to clipboard

Support enums with underlying types other than int32 in yaml config

Open zb140 opened this issue 1 year ago • 0 comments

Proposed change

While adding some yaml config to my app, I discovered that enum values could be parsed only if they had Int32 as an underlying type. This change modifies the config parsing to allow enums with other underlying types.

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (which adds functionality to an existing integration)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the [development checklist][dev-checklist]
  • [x] The code compiles without warnings (code quality chek)
  • [x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

zb140 avatar Jun 09 '24 03:06 zb140