Closed Garfonso closed 2 years ago
@GermanBluefox
I fixed another issue with mediaPlayer
in this branch (sorry, for not creating a new one). (related issues https://github.com/ioBroker/ioBroker.devices/issues/140 and https://github.com/ioBroker/ioBroker.devices/issues/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?
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 https://github.com/ioBroker/ioBroker.devices/pull/190 which makes sure to use the duplicate with defaultRole during creation, this should fix some issues in devices adapter.