Problem with simple notifyMyAndroid Rule

Hi, I’m trying to make a simple rule that takes a String value assigned to my Notify_Sensor Item (recieved from MQTT) and send it out to notifyMyAndroid.

rule "NodeDead"
when
        Item Notify_Sensor received update
then
        notifyMyAndroid("Sensor Node Dead", Notify_Sensor.state)
end

This is being triggered by the Item update, but in the log I get:

[ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘NodeDead’: Index: 2, Size: 2

My Item definition is:

String Notify_Sensor (Notification) { mqtt=“<[home:mBed/NodeDead:state:default]” }

When I take out Notify_Sensor.state and replace it with a direct string value I get a notification, so I’m happy that my NMA key works.

Any idea what I’m doing wrong?

Cheers,

Matt

Ok, fixed it. For anyone else that stumbles upon this, I needed to convert the state to a string. This works:

rule "NodeDead"
when
        Item Notify_Sensor received update
then
        notifyMyAndroid("Sensor Node Dead", Notify_Sensor.state.toString)
end