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

Correct MetaData MIN+MAX on SV change #2179

Merged
merged 2 commits into from
Jan 22, 2023

Conversation

jp112sdl
Copy link
Contributor

Description

When changing the type of a system variable, the MetaData() of MIN and MAX are not getting cleared, if the system variable has not a min-to-max range.

This patch will always set the MetaData(MIN) and MetaData(MAX) to null first.

Related Issue

https://homematic-forum.de/forum/viewtopic.php?f=65&t=77676&start=20#p754163

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Alternate Designs

Possible Drawbacks

Verification Process

Release Notes

Contributing checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING and LICENSE document.
  • I fully agree to distribute my changes under Apache 2.0 license.

jp112sdl and others added 2 commits January 21, 2023 21:37
They are only valid for value type "float" and subtype "generic"
metadata from system variables when changing its type.
@jens-maus
Copy link
Owner

Changed your PR to better use RemoveMetaData() instead of using 'null' because using null will just set it to null and not remove it!

@jens-maus jens-maus merged commit 4e2ea40 into jens-maus:master Jan 22, 2023
@jp112sdl
Copy link
Contributor Author

Didn't know the presence of RemoveMetaData...
Requesting MIN or MAX gave back null. So I thought it simply has to be set to null.

@MichaelN0815
Copy link
Contributor

Wir müssen da noch mehr "resetten":
Unbenannt
Das sind "Überbleibsel" wenn die SV vorher Typ Logik oder Typ Werteliste war.

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.

3 participants