When we thought we were going to rent out our Villa. We had one of those devices fitted whereby your house key is locked into a plastic disc that you have to put in to have the electric on and when you take it out the electric goes off. A bit like the cards you get in hotels.
We still have it, but of course, never used it.