I’ve moved these posts over here to keep Stephen’s topic about his (excellent) sensor.
For anyone daunted by the DIY required for this sensor please check out Stephen’s pre-built sensor, highly recommended: Bed Presence for ESPHome by Elevated Sensors