logic should be your guide.
the device has 3 choices. you want a warm beverage, a cold one, or room temperature.
what is the base of the logic that the device will use ? how does it know ? motion sensing ? time of day ? time since filled ?
the amount of energy needed to heat or cool one beverage is massive. not easily battery powered. put a cup on the stove or microwave and see how long it takes. assuming future power sources will be much smaller, it could be done.
does it keep it hot forever ? say you walk into the next room and come back, fine, but what if you walk into the next room, go to the store or work and come back ?
the time to re-heat will not be short, the energy cost of keeping hot will be high.
a hot drink will evaporate and after time will change.