Something a little weird going on here Luke with on device parameter editing. I'm just messing around with a basic button. The button has a 'default' state that has a custom image, send even into Girder and then changes button state to 'CoffeeMachineOn' (a custom state I created for button). The 'CoffeeMachineOn' state has all the same parameters except a different image, different send even into Girder and a change button state back to 'default'. For some strange reason this is the code it generates in XML. On press in the 'CoffeeMachineOn' state (i.e. to turn the coffee machine off) it sends two commands in quick succession into Girder rather than just the one to turn the coffee machine off. Only one event shows in the on device editor and all looks OK there. Make sense?
Code:
<Button id="red" margins="15,15,15,15" alignParentVCenter="true" alignRightOf="btngrp_timewidget" allowSkinning="true" states="CoffeeMachineOn">
<Parameter name="labelcolor" state="coffeemachineon">ffffffff</Parameter>
<Parameter name="labelsize" state="coffeemachineon" action="display,release">23</Parameter>
<Parameter name="labelsize" state="coffeemachineon" action="touch">33</Parameter>
<Parameter name="labelxoffset" state="coffeemachineon">-6</Parameter>
<Parameter name="labelyoffset" state="coffeemachineon">-8</Parameter>
<Parameter name="labelshadowradius" state="coffeemachineon">3</Parameter>
<Parameter name="labelshadowxoffset" state="coffeemachineon">3</Parameter>
<Parameter name="labelshadowyoffset" state="coffeemachineon">3</Parameter>
<Parameter name="labelshadowcolor" state="coffeemachineon">ff000000</Parameter>
<Parameter name="buttontintcolor" state="coffeemachineon" action="touch">FFFF3737</Parameter>
<Parameter name="buttontintcolor" state="coffeemachineon" action="display,release">FFFFFFFF</Parameter>
<Parameter name="labelstyle" state="coffeemachineon">bold</Parameter>
<Parameter name="labeltypeface" state="coffeemachineon">agency</Parameter>
<Parameter name="vibratelength" state="coffeemachineon">50</Parameter>
<Parameter name="playsound" state="coffeemachineon">pop</Parameter>
<Parameter name="serviceusername" state="coffeemachineon" action="touch,heldstart,heldrepeat" />
<Parameter name="servicepassword" state="coffeemachineon" action="touch,heldstart,heldrepeat" />
<Parameter name="animation" state="coffeemachineon" action="display" />
<Parameter name="imageurl" state="coffeemachineon">/buttons/export-109.png</Parameter>
<Parameter name="serviceparams" state="coffeemachineon">device=4008,event=CoffeeMachineOnOff</Parameter>
<Parameter name="labelcolor" state="CoffeeMachineOn">ffffffff</Parameter>
<Parameter name="labelsize" state="CoffeeMachineOn" action="display,release">23</Parameter>
<Parameter name="labelsize" state="CoffeeMachineOn" action="touch">33</Parameter>
<Parameter name="labelxoffset" state="CoffeeMachineOn">-6</Parameter>
<Parameter name="labelyoffset" state="CoffeeMachineOn">-8</Parameter>
<Parameter name="labelshadowradius" state="CoffeeMachineOn">3</Parameter>
<Parameter name="labelshadowxoffset" state="CoffeeMachineOn">3</Parameter>
<Parameter name="labelshadowyoffset" state="CoffeeMachineOn">3</Parameter>
<Parameter name="labelshadowcolor" state="CoffeeMachineOn">ff000000</Parameter>
<Parameter name="buttontintcolor" state="CoffeeMachineOn" action="touch">FFFF3737</Parameter>
<Parameter name="buttontintcolor" state="CoffeeMachineOn" action="display,release">FFFFFFFF</Parameter>
<Parameter name="labelstyle" state="CoffeeMachineOn">bold</Parameter>
<Parameter name="labeltypeface" state="CoffeeMachineOn">agency</Parameter>
<Parameter name="vibratelength" state="CoffeeMachineOn">50</Parameter>
<Parameter name="playsound" state="CoffeeMachineOn">pop</Parameter>
<Parameter name="serviceusername" state="CoffeeMachineOn" action="touch,heldstart,heldrepeat" />
<Parameter name="servicepassword" state="CoffeeMachineOn" action="touch,heldstart,heldrepeat" />
<Parameter name="animation" state="CoffeeMachineOn" action="display" />
<Parameter name="imageurl" state="CoffeeMachineOn">/buttons/export-108.png</Parameter>
<Parameter name="serviceparams" state="CoffeeMachineOn">device=4008,event=CoffeeMachineOff</Parameter>
<Parameter name="changestate" state="CoffeeMachineOn">default</Parameter>
<Parameter name="imageurl">/buttons/export-109.png</Parameter>
<Parameter name="serviceparams">device=4008,event=CoffeeMachineOn</Parameter>
<Parameter name="changestate">CoffeeMachineOn</Parameter>
</Button>