Thank you for your reply.
I followed your example and changed out the Fibaro smart implant with an asp32 and your code, witch is working really well.
When I get in bed it reacts fast and accurate, but when I get out off bed after a night sleep the value drops really slowly sometimes it takes hours.
My guess is that there is still some mechanical strain on the sensor that takes some time to level out, I put it between my two thick matrassen and you put it on the wooden slate.
i’am gonna try to put a piece of wood under the sensor to see of that helps, or maybe you have some advice for me