29.05.2025, 08:11
(28.05.2025, 10:42)admin Wrote: Example of how to enable/disable certain elements depending on a group address value.
Add enable-by-0_0_1 to Appearance - Additional classes for relevant elements.
CSS:
Code:.user-view .enable-by-0_0_1 { pointer-events: none; opacity: 0.5; } .on-0_0_1 .user-view .enable-by-0_0_1 { pointer-events: all; opacity: 1; }
JS:
Code:localbus.listen('object', '0/0/1', (value) => { document.body.classList.toggle('on-0_0_1', value) })
I am not familiar with this coding, so sorry for my inorance.
Will that act as Enable/Disable on the objects used?
Can we also change the color of the objects? (i.e. grey for disabled, red for enabled)