Java.lang.number error in log

Do you have some other code that refers to a Person_1 Item? There is no reference to such an Item in the above code and the error is caused by trying to sendCommand or postUpdate or set the state of a Switch Item with the value 1.

Also, now that I see the code above a little more closely, you should absolutely NOT be using setState to change the state of an Item.

If you want to command something to do something you use sendCommand. If you want to just change an Item’s state without what ever is linked to that Item performing an action you use postUpdate.