<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def set_room_temperatures(self, room_id, sleep_temp=None, comfort_temp=None, away_temp=None):
 """Set room temps."""

        if sleep_temp is None and comfort_temp is None and away_temp is None:
            return
        room = self.rooms.get(room_id)
        if room is None:
            _LOGGER.error("No such device")
            return
        room.sleep_temp = sleep_temp if sleep_temp else room.sleep_temp
        room.away_temp = away_temp if away_temp else room.away_temp
        room.comfort_temp = comfort_temp if comfort_temp else room.comfort_temp
        payload = {"roomId": room_id,
                   "sleepTemp": room.sleep_temp,
                   "comfortTemp": room.comfort_temp,
                   "awayTemp": room.away_temp,
                   "homeType": 0}
        await self.request("changeRoomModeTempInfo", payload)
        self.rooms[room_id] = room