The RBE node is great to automate MQTT based on a state-change event. However quite often it is needed to check the last published state of a sensor, this information is now hidden inside the RBE node (can be achieved with an extra change node).
My proposal is to add the following functionality:
- a setting in RBE to select state storage between: nodeContext, flowContext, globalContext
- in case of flow and global, user should be able to define a context key
This functionality will provide the following scenarios:
- at any time the last published state could be read from the flow or global context,
- last state is preserved between deploys (IMO this sucks right now),
- if context key is shared between RBE nodes, they all act as kind of one node, which can sometimes be useful too
This change seems to be quite easy to be implemented. I will of course develop it, however, I need to know if it makes sense in your opinion, so the pull request will be accepted.