state."${thisKey}" = [onoff: 'off', level:0, hue: 0, sat:0, colortemp: 2700]
state.remove("${thisKey}")
It's not being removed. How do you remove this sort of multi-key entry?
state."${thisKey}" = [onoff: 'off', level:0, hue: 0, sat:0, colortemp: 2700]
state.remove("${thisKey}")
It's not being removed. How do you remove this sort of multi-key entry?
You need
state.remove(thisKey)
thisKey is a string. "$thisKey" is a gstring
Brilliant - thanks! Grrr I thought I'd tried it every way lol