I’ve implemented a bed sensor via an Aqara Door/Window Sensor (connecting the two leads of the sensor mat to the ends of the reed switch). This bed sensor is being used with an elderly parent who needs certain machines (Oxygen, etc.) running when in bed.
In the Aqara app, it shows the sensor as being closed when the bed is occupied, and open when unoccupied, as expected.
This is being used in HA via the Aqara M2 hub integrated with the Matter integration. I’ve changed the entity to show as “Occupancy”. When the bed is occupied, it shows as “Clear”, and when unoccupied, it shows as “Detected”. This makes automations that are set to trigger when the “bed became occupied” trigger when leaving the bed, and vice versa.
For a workaround, I can have the “Bed Occupied” automation trigger when the “bed became unoccupied”, and the “Bed Unoccupied” automation trigger when the “bed became occupied”. However, this is confusing, and I’m sure will lead to other issues when building any other automation with this sensor.
My desired goal: have the bed sensor indicate occupied (detected) when the bed is occupied, and unoccupied (clear) when not occupied.
My system: HA installed on an x86 machine (Generic x86-64 - Home Assistant, method 1).
Core: 2024.7.0
Supervisor: 2024.06.2
Operating System: 12.4
Frontend: 20240703.0
I’m not sure how to get the Matter integration version (I have only seen it when it shows up needing an upgrade), but it was updated to the latest just yesterday.
I’m a newbie to HA, with just a few things being automated currently. I’m not sure if this is a bug (why would an occupancy sensor show as occupied without the triggering occupied signal from the sensor mat?), or how I would go about reversing the reported states of this sensor to be used in automations and reflected in dashboards, etc.
Any help in resolving this is greatly appreciated!