In a hospitality building, guests’ presence ratio (%) in the room is low due to the varying schedule and needs (business, shopping, sightseeing etc.) of individual guests. So, the energy consumption can be reduced during guests’ absence by turning the HVAC off for the room, but it can cause discomfort to the guest when they come back to the room. So it poses trade-off problems to maintain the comfort for the user and reduces the energy consumption at the same time in a hospitality building. This paper proposes an algorithm to solve the above-mentioned problem.