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

Unify DPT definitions #1517

Open
4 tasks done
farmio opened this issue Jul 18, 2024 · 1 comment
Open
4 tasks done

Unify DPT definitions #1517

farmio opened this issue Jul 18, 2024 · 1 comment

Comments

@farmio
Copy link
Member

farmio commented Jul 18, 2024

Set explicit dpt numbers for all DPT transcoder definitions and eliminate the need for DPTBase.has_distinct_dpt_numbers() (and possibly has_distinct_value_type())

DPTs to refactor to achieve this:

  • DPT 3 (all)
  • 10 - Date
  • 11 - Time
  • 19 - DateTime

Further set up a unittest to avoid new DPT definitions to break this behaviour - eg. don't have explicit dpt_sub_number set (dpt_main_number may be inherited) and to not have base classes in the lookup tree.

assert [
    c for c in DPTBase.__recursive_subclasses__() if c.has_distinct_dpt_numbers()
] == [c for c in DPTBase.__recursive_subclasses__()]
Copy link
Contributor

github-actions bot commented Nov 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please make sure to update to the latest version of xknx (or Home Assistant) and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 1, 2024
@farmio farmio added no-stale and removed stale labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant