Closed Angelk90 closed 3 years ago
Hi @Angelk90, I'm not super clear on what you mean by changing the status, but the message function is usually unrelated to device status, as in it doesn't check or update the status, so unless you call for that manually you won't get that. You can call something like on('delta') that would do something on status change, or on('status') and play with that see if that works for you?
Hi @KaibaLopez ,
in a nutshell, I receive messages, do I have to add these messages to the state
up to here we are?
Sorry, I don't understand your question. But I don't think you got that right, the idea is that you won't get a change in device state by sending a message.
@Angelk90 Do you still have any questions regarding message state
?
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
I have a state that I use to keep information, the problem is that after I receive the first time a message, it seems that inside the onMessage function, I always see it in the same way, that is, as it was before receiving the first message.
That is:
StateOriginal
I get a message
I change an obj inside the state
I get a message
The state I see is the original one, not the one with the changes
You know give me a hand?
Code: