UIBUILDER 6.5 question about updateing html parts and classes

Hi,
this question are about 6.5 I allready updated to 6.6 but not to 6.7 (but I will do as soon as possible)

Actually I do have static coded html "elements" that are looking like this

                    <div class="info-element button switch uibuilder" id="ccc-defencepower" data-type='hm-switch' data-target='ccc-defencepower' data-do='toggle' data-action='' data-system='BidCos-RF' data-device='HMXY231344' data-getchannel='0' data-setchannel='1' data-state='true'>
                        <div class="titel">
                            Zaun
                        </div>
                        <div class="icon" id="ccc-defencepower-icon"></div>
                        <div class="label" id="ccc-defencepower-label">W</div>
                        <div class="value" id="ccc-defencepower-value">-</div>
                        <div class="led" id="ccc-defencepower-led"></div>
                    </div>
  • The "element" sends data to uibuilder and I can send this to my smart home (homematic) device.
  • I am able to Update single Parts (tags) and I can change classes

but it guess I could do it better but I am unsure if I miss something

How would I add or remove CSS classes - instead of setting one class with the edit node?
For example I want to set an "powerON" / "powerOFF" class additional to other classes

best regards
Antonio B.

I assume that you want to use no-code updates to change the classes?

If so, unfortunately, this has to be done by changing the whole list at the moment. Individual class name changes are on the backlog. So if you wanted to change <div class="led" id="ccc-defencepower-led"></div> to include the powerON class, you could use a uib-update node and just use the attributes change feature sometihng like {"class": "led powerON"}.

This is the same in v6.6 and v6.7 as well.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.