Body Weight Comparison

Not sure if I am in the correct location for this, but i hope someone can point me in the right direction. So i have a sensor coming in from Withings (body weight in kg) I have turned this into a KG and was hoping i could somehow get a new value that shows the comparison between yesterdays and todays weight loss (or gain).

Any ideas ?

Use an automation to copy the current value into an „Input Number“ helper regularly and a template sensor to compute the difference.

can you give me an example of how i do the copy, i have a new input number variable but cant see how you move a existing sensor value into it ?