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

fix issues with double states #190

Merged
merged 3 commits into from
Nov 3, 2022
Merged

Conversation

Garfonso
Copy link
Contributor

@Garfonso Garfonso commented Sep 30, 2022

Some states in type-detector are duplicated (for example, ON in lights). One of them has no default state (which is good, because it is not shown) but the simple find for some reason tends to find the state without default role, so a role is not assigned, and the state is not detected by type-detector anymore and "lost" after saving.

Now added a second find to make sure that the state with defaultRole is used, if existing.

Not sure if the fallback is needed at all...

Related issues (some together with type-detector PR):
#159
#141
#106
#128

some states in type-detector are duplicated (for example ON in lights). One of them has no default state (which is good, because it is not shown) but the simple find for some reason tends to find the state without default role, so a role is not assigned and the state is not detected by type-detector anymore and "lost" after saving.

Now added a second find  to make sure that the state with defaultRole is used, if existing.

Not sure if the fallback is needed at all...
Garfonso added a commit to Garfonso/ioBroker.type-detector that referenced this pull request Sep 30, 2022
Remove default roles for duplicate ON states (and add defaultUnit for dimmer in some cases) so that they don't show up in devices UI.

Probably I added them in the first place. Sorry, did not understand how devices works.

With PR ioBroker/ioBroker.devices#190 which makes sure to use the duplicate with defaultRole during creation, this should fix some issues in devices adapter.
@GermanBluefox GermanBluefox merged commit 7508034 into ioBroker:master Nov 3, 2022
@GermanBluefox
Copy link
Collaborator

Thank you!

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.

2 participants