After some investigation I found out that there was actually an issue with "Program.UiRefresh" event.
It would only work for program modules.
Now the ui refresh event will work with any kind of modules (interface modules, and virtual modules as well).
So it was not a problem of the generic sensor widget (sorry about addressing a wrong issue
.
I'm attacching the
_event.js patched file, in case you want already test the fix. Simply copy it over the old file in the
homegenie/html/pages/events folder.
Note that using the Program.UiRefresh event and changing the value of a parameter directly without using the RaiseEvent method, it will only notify the UI that the widget needs to be refreshed, while the parameter change will never be notified to the system. For example it won't be caught by
When.ModuleParameterChanged .
In next hg update there will be another way of calling the RaiseEvent without making it popup in the UI;
Program.RaiseEvent(myModule, "Status.Level", "1", ":nopopup:Optional event description");
the ":nopopup:" option at the start of the description field, will prevent the popup from being shown but it will still raise the event in the system.
g.