Couldn't you power the required electronics with some kind of thermocouple between the hot coffee and the outside of the mug? Of course, that would cool your coffee infinitesimally faster, but you'd at least be able to have a beeper. And it would derive no power from an empty mug, so it might simplify the "no coffee" case.
no subject