sendEvent() and subscribe() problem with string case

Thanks for the clarification - i'll try to post one that is complete. Answering the above i have tried numerous times and variations using "StatusBits" in the case statement.

the event goes out fine and always has.

it is also subscribed to in the App Event Subscriptions

Above I was simply trying to state that it works if both names are "statusBits", but not when the names are "StatusBits".

Again, i'll try to post something simple and complete later.

In case somebody runs across this in the future, the whole issue was centered around the fact that my "StatusBits" value had not changed, so even though sendEvent() sent, and it was subscribed to in the App, the handler never got called.

I created a quick test to just modify the value and "presto" the handler was called even with the upper case first letter.

I found the nugget in some post @mike.maxwell had done.

You may have found this in the above, but in case not, the platform filters out events by default if the attribute value doesn't change. You can set isStateChange to true to force it to anyway (may not be necessary for you, but a common example of where you probably always want this is on button drivers for the pushed, held, and released events).

Glad you got it figured out!

1 Like

Aha, thank you much!