Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


HC3 QuickApp dropdown/select UI shows stale selections after updateView


Recommended Posts

Posted

Hi Fibaro R&D team,

I am seeing a consistent issue with QuickApp select/dropdown elements in the HC3 Device Preview UI.

This is not a Lua state problem. The QuickApp state is correct, the debug logs show the correct values, and the save/action logic receives the correct data. The problem is that the rendered Device Preview UI can keep showing stale selected values after the QuickApp updates the dropdown programmatically.

Context:

I am building a configuration QuickApp where the user maps Logic Group Matrix buttons to different target systems such as Hue, Velux/Tahoma, and Sonos.

The UI contains dynamic dropdowns/selects for:

Destination type
Target device
Matrix device
Button mapping profile

Typical flow:

Select Hue
Select a Hue device
Select a Matrix device
Select button mappings
Save mapping
Switch destination type to Velux/Tahoma
Lua state is cleared correctly
Device Preview UI may still show old Hue/button selections, or otherwise stale dropdown state

The internal state is correct. The visual UI is not always correct.

 

We tested multiple approaches:

self:updateView("selectName", "selectedItems", {})
self:updateView("selectName", "values", {})

For single-select elements we also tested:

self:updateView("selectName", "selectedItem", "")
self:updateView("selectName", "value", "")

We also tested clearing and republishing options:

self:updateView("selectName", "options", {})
self:updateView("selectName", "selectedItems", {})
self:updateView("selectName", "values", {})

fibaro.setTimeout(80, function()
  self:updateView("selectName", "options", options)
  self:updateView("selectName", "selectedItems", values)
  self:updateView("selectName", "values", values)
end)

For multi-select we also tested clearing with:

self:updateView("selectName", "selectedItems", { "" })

 

The behavior remains unreliable. Sometimes the UI updates correctly, sometimes it keeps showing an old selection. If the user switches away from the Preview tab, for example to Variables, and then back to Preview, the UI often corrects itself. That strongly suggests a Device Preview render/cache issue rather than a QuickApp logic issue.

 

This is problematic for configuration QuickApps because the visible UI can no longer be trusted. The user may see a selected item that is no longer selected in the QuickApp state.

 

Questions for Fibaro R&D:

What is the officially supported way to clear a QuickApp dropdown/select from Lua?

Is there a difference between clearing single-select and multi-select elements?

Which properties are officially supported and recommended: selectedItem, selectedItems, value, values, or a combination?

Is the Device Preview cached in a way that can prevent immediate visual updates after updateView?

Is there a supported way to force the Device Preview UI to re-render a select element?

When options are updated dynamically, is the previous selection expected to be preserved, cleared, or validated against the new options?

Is the behavior different between legacy viewLayout and the newer UI?

Can Fibaro provide a minimal supported example showing how to:

Create a select/dropdown
Select an item
Clear the selection programmatically
Replace the options dynamically
Handle both single-select and multi-select correctly

 

Expected behavior:

When updateView changes or clears a select value, the visible Device Preview UI should immediately reflect the actual QuickApp state.

 

Actual behavior:

The QuickApp state changes correctly, but the Device Preview UI can continue to show stale selected values until the Preview tab is reloaded or reopened.

From a developer point of view, this looks like either an undocumented API detail or a Device Preview rendering/cache bug. A clear statement from Fibaro R&D on the supported API and expected behavior would be very helpful.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...