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 double on state in light devices #31

Merged
merged 3 commits into from
Nov 9, 2022

Conversation

Garfonso
Copy link
Contributor

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.

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.
because of array of states it was not detected if no cover was found...

Maybe think about removing the array. It is currently the only pattern that needs it and it requires a lot of stuff later on. Also cover does not show up in devices, so there need to be changes there, too..
@Garfonso
Copy link
Contributor Author

Garfonso commented Oct 1, 2022

@GermanBluefox

I fixed another issue with mediaPlayer in this branch (sorry, for not creating a new one). (related issues ioBroker/ioBroker.devices#140 and ioBroker/ioBroker.devices#152 ).

But the fix is quite ugly, IMHO. mediaPlayer is currently the only pattern that allows an array of states (for cover). From my point of view, the array is not really necessary in that place. It could just be a duplicate entry like in ON states in color lights... it would ease the detection code quite a lot (it seems the array stuff was forgotten in some other change sets).

Also, the cover state does not show up in devices, so it seems devices does not yet support arrays of states. So maybe just get rid of the array there?

@GermanBluefox GermanBluefox merged commit 36fa0ea into ioBroker:master Nov 9, 2022
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