Network UPS Tools (nut) setup issues

I use 2 Items and a rule to do this: Ubiquiti Unifi Binding Feature Discussion - #443 by Dim

but it should be better with a JS xform