Nothing fancy was needed for this, the sensor I'm talking about is battery operated. I have this one: https://www.zigbee2mqtt.io/devices/WSDCGQ11LM.html or this one: https://www.zigbee2mqtt.io/devices/WSDCGQ12LM.html (they look alike too much).