I measure the yield of my solar panels and created a Telegram interface. However, there is one problem I'm not able to solve...
This is the situation. The incoming MQTT message contains the total yield and I want to report the daily yield. So what I did: I created a trigger every day at 1:00 AM to set "flow.daystart" to the current total yield. This works. Then, when a new message is coming in, I try to set flow.dailyyield to the expression "msg.payload.yield - flow.daystart". However, this does not work, the flow.dailyyield is empty. If I adapt the change node to set flow.dailyyield to a numerical value (or to msg.payload.yield), there is no problem in using the value in the telegram message.
I cannot find out what is the cause. It seems that the trivial JSONata expression is not working. Do you have a clue what can be the problem?