How to make a custom expression?

Hi! I wanted to ask how to make expression that checks if the property added or removed value when property changed sensors gives positive pulse. I need 2 expressions- one hsould give sygnal further if property added 1, other one should give further sygnal if removed one.

This is a stateful check. You need to store the previous value (e.g. in a different property). Then you can compare against that value.

expression: value = previous + 1

But, I would let the logic that adds 1 to the value send a message (e.g. subject “value increased”). So you can react on receiving the message.

The logic is in the script(vehicle wrapper) so it is impossible. Anyway, should I replace previouse with sensor name?

OK! That thing was problem, I found a resolvement, but I want to know how to multiply value of property while copying it from another object.