Issue with mediaPreset capability

There is a bug in the ‘proposed’ mediaPreset capability on Edge. The table you pass into the presets event is modified and the items are removed locally in the Lua code. Running something like this will cause myPresets to be empty after emitting it. I am assuming this is not expected behavior.

local myPresets = {
    { name = 'John', id = 'A' },
    { name = 'Jane', id = 'B' },
    { name = 'Mike', id = 'C' }




Are you using the Hub’s firmware version 43?

No. This is seen on 42.

Ah, this is similar to an issue reported here:

The team mentioned this is solved in the v43, the current solution is using deep_copy(), for example:


Perfect. This sounds like the exact same issue :+1:

The solution for me was also a deep copy. Thanks

1 Like