This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

change color switch
#2
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.
Code:
Visu.on('widget-ready', 44, ({ widget }) => {   const addr = '0/0/1'      widget.compactModeClick = () => {     const value = localbus.getvalue(addr)     localbus.write(addr, !value)   } })
Reply


Messages In This Thread
change color switch - by dezza@sdme.it - 28.11.2026, 14:40
RE: change color switch - by admin - Yesterday, 08:35

Forum Jump: