Yesterday, 08:35
There is no specification on the widget internals. You can use browser dev tools to determine which CSS properties can be changed an how. Switch background is set directly without CSS variables.
If your switch uses fixed send mode then you can simply use 32/1/10 as the status object.
Otherwise the easier way is to override the sending function of the switch. Then you can fully configure how the switch looks from the UI. Note that sending to the custom address will only work in user view but not in admin.
If your switch uses fixed send mode then you can simply use 32/1/10 as the status object.
Otherwise the easier way is to override the sending function of the switch. Then you can fully configure how the switch looks from the UI. Note that sending to the custom address will only work in user view but not in admin.
Code:
Visu.on('widget-ready', 44, ({ widget }) => {
const addr = '0/0/1'
widget.compactModeClick = () => {
const value = localbus.getvalue(addr)
localbus.write(addr, !value)
}
})