Bed Sensor, wrong state being shown in HA

Without knowing how the reed switch is physically configured on the hardware side of the Aqara sensor, I’d assume that it’s Normally Open instead of Normally Closed.

This means that it needs to have the magnet close to it to close the reed switch and complete the circuit.
You have 3 options:

  • Check if your pressure mat has an unused wire which is marked as NO instead of NC. Wire NO up to the door sensor instead of the NC wire.
  • Replace the reed switch on the Aqara for a NC reed switch. They’re pretty cheap but you need basic soldering skills
  • Invert the status in software using a template sensor (which is the equivalent of ESPHome’s inverted: true) and use the newly-created sensor in your automations.

I can’t help much with the last option since I really suck at templating even the most basic stuff, but do put a vote for this request to make it easier for all of us in future.