I'm basically looking for a reverse relay: I want to switch around 5V with wall outlet power (230V 50Hz in my country). When wall power goes out, the low-voltage circuit should open. I don't have space to use a phone charger / wall wart, and I'd like to avoid anything involving just a diode + resistor which would heat up and waste energy.
Do these kind of relays exist? I previously thought this kind of thing could be accomplished easily but now that I'm looking, I can't find anything.